Processing not running my Python script and now won't load native code

I’m new to Processing (and have limited experience with Python in general).

I’m trying to run my Python script and I’m getting this error message in the console:

Hmm. Can’t load native code to bring window to front using the absolute path: /Users/jenniferalmarine/Documents/Processing/modes/PythonMode/mode/libjniosx.dylib.
Hmm. Can’t load native code to bring window to front.

I moved my Python folder from Documents to a folder on my hard drive because Documents syncs with my iCloud account. When I first downloaded Processing and was going through a tutorial, it wouldn’t run a script and I read online that the syncing could be the issue so I moved it but now I’m getting this error.

macOS Big Sur (11.6)
Processing 3.5.4 (I’ve also tried Processing 4)

Edit: I tried finding my answer online. I found this thread but there doesn’t seem to be a resolution.

2 Likes

Welcome Jennifer!

Sorry to hear it’s not working. I have never seen a message like yours.

Can you run some sample/test code like this:

def setup():
    size(400, 400)
    rect(10, 10, 100, 100)

it should produce something like this:

I didn’t understand the part about moving your Python folder… I suppose moving the Python mode folder will break it. Could you try removing and re-installing the Python mode from the IDE (the Processing Editor)?

You can save your projects, called sketches, outside the Documents folder. A Processing project is always a folder with the same name as the main sketch file. In Python mode usually something like a folder called sketch_21NNN and a file called sketch_21NNN.pyde inside.

1 Like

I have the same issue. I cannot run any sketch even the example given villares. Has anyone got the solution?
I’m using macOS 12.3.1 and Processing 4.0b8 (Python mode).

I have tried removing and reinstalling processing and python mode - no results.

Welcome @pavel

Is this something that works in Processing 3.5.4? Or is it just Processing 4 beta that seems to have trouble?

I tried 3.5.4 and it worked without any issues. Thank you, @tabreturn! I think I’m going to stick to this version.

But I also found the fault with 4.0b8 - its P3D render. If I change it to default, 4.0b8 works too (with the exception that it will create a new sketch window every time I click “run” without closing the old one). Although, it does not explain why I could not run a simple sketch before…

2 Likes