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

**URL:** <https://discourse.processing.org/t/processing-not-running-my-python-script-and-now-wont-load-native-code/32323>\
**Category:** Processing.py\
**Created:** [September 20, 2021, 1:21am UTC](https://discourse.processing.org/t/processing-not-running-my-python-script-and-now-wont-load-native-code/32323 "2021-09-20T01:21:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenniferalmarine](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jenniferalmarine/32/14515_2.png) [@jenniferalmarine](https://discourse.processing.org/u/jenniferalmarine)\
**Post date:** [September 20, 2021, 1:21am UTC](https://discourse.processing.org/t/processing-not-running-my-python-script-and-now-wont-load-native-code/32323/1 "2021-09-20T01:21:02Z")

</div>

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](https://forum.processing.org/two/discussion/20689/python-3-code-not-running-in-processing-3-2-4-on-mac-os-10-12-3) but there doesn’t seem to be a resolution.

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [September 20, 2021, 3:26am UTC](https://discourse.processing.org/t/processing-not-running-my-python-script-and-now-wont-load-native-code/32323/2 "2021-09-20T03:26:43Z")

</div>

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:

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

```

it should produce something like this:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/382710f9414a9865712a1057e24adc4841223aac.png)

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.

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pavel/32/16194_2.png) [@pavel](https://discourse.processing.org/u/pavel)\
**Post date:** [May 7, 2022, 9:36pm UTC](https://discourse.processing.org/t/processing-not-running-my-python-script-and-now-wont-load-native-code/32323/3 "2022-05-07T21:36:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [May 7, 2022, 9:40pm UTC](https://discourse.processing.org/t/processing-not-running-my-python-script-and-now-wont-load-native-code/32323/4 "2022-05-07T21:40:50Z")

</div>

Welcome @pavel

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

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pavel/32/16194_2.png) [@pavel](https://discourse.processing.org/u/pavel)\
**Post date:** [May 7, 2022, 10:15pm UTC](https://discourse.processing.org/t/processing-not-running-my-python-script-and-now-wont-load-native-code/32323/5 "2022-05-07T22:15:18Z")

</div>

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…
