Processing 3.5.4 not working with python mode

Hello,
So after I googled online for a while I still can’t find the solution.
I tried mostly everything I can find on the web. Reinstalling, firewall etc.
My java mode works fine, just python mode is not.

Welcome @wunaizcy

I have a few questions:

  1. What OS are you using?
  2. Can you switch to Python Mode (using that mode button at the top-right of the editor)? Did you manage to install Python Mode from the Contribution Manager window?
  3. Are there any errors in the Console (black area at the bottom of the editor) when you try and run a Python sketch?
  4. Would you happen to be using some networked account on a Windows machine?

Hi,
1.I am using windows 10.
2. Yes I am able to switch mode and able to click run, the run icon will turn green but nothing pops.
I installed from the add mode in processing.
3.First there is nothing in the console then if I tried to run another sketch this will show:
removing C:\Users\smith\OneDrive\Desktop\cs5001\hw10\pacman_game_starter\pacman_game_starter.pyde
java.lang.Exception
at processing.app.ui.Recent.remove(Recent.java:246)
at processing.app.ui.Recent.append(Recent.java:294)
at processing.app.Base.handleOpen(Base.java:1337)
at processing.app.Base.handleOpen(Base.java:1314)
at processing.app.Base.handleOpen(Base.java:1303)
at processing.app.ui.Recent$1.actionPerformed(Recent.java:217)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
4. I don’t think so or I don’t know this is my pc and I’m the only user.

I’m afraid I haven’t encountered this issue before. I don’t have any problems running Python Mode on my Windows machine (same Processing and OS as far as I can tell). I have Processing running from a folder on my desktop; I don’t use OneDrive.

Maybe it’s your code? Have you tried creating a very simple sketch – like, a one-liner with just square(10, 10, 10). See if that runs or if you get the same error.

Maybe somebody else on the forum could help …

1 Like

Don’t use remotely synchronized folders to store Processing sketches! :fearful:

2 Likes

My code works because I got it tested out on my friend’s computer.
Thank you for your information. :slight_smile:

I think its just my desktop is under onedrive, but I’m not using it remotely. Can you explain it more?
Very apprcreciate.

Maybe create a new directory ‘above’ the OneDrive one, like C:\Users\smith\processing. You can store your Processing files in there so they aren’t synchronized.

You might even use a Git repository so those files are version-controlled (and duplicated in the cloud).

This is where my processing is at C:\Users\smith\Documents\processing-3.5.4
and this is where the sktech i want to run is at C:\Users\smith\hw10\pacman_game_starter
Unfortunaly this doesn’t solve the issue.

Hmm. In the Processing editor, select File > Preferences. Check that the Sketchbook location isn’t in the OneDrive directory. Restart Processing if you change anything.

1 Like

@tabreturn has a broguht a good point! Checking at the preferences were your sketchbook a.k.a “Documents/Processing/” is stored, because the libraries and Python Mode files are kept there. It could be an issue, I suppose.

install Oracle JDK1.8* and add the bin path to the system environment.

Welcome @qfxfox! I’m afraid this might not be a good idea. The Processing IDE always uses its own Java runtime, not the one from the system, so we never recommend installing another JDK just to try to solve Processing IDE issues.

[EDITED: Changed reply to clarify it is OK to install other Java runtimes. Processing IDE just won’t notice them]

1 Like

@villares Doesn’t seem to be a problem on linux (and I can’t imagine its any difference on Windows.
See result from terminal (ie installed java) compared with processing-3.5.4.

1 Like

Cheers @monkstone!
I guess my message sounded ambiguous! Sure, there is no harm in installing Open JDK.
I just wanted to say that I think it is not a good idea to suggest installing any other Java in order to solve Processing IDE issues, like the one being discussed on this thread, as Processing won’t even “see” it.

1 Like