# Error message when starting python mod

**URL:** <https://discourse.processing.org/t/error-message-when-starting-python-mod/26841>\
**Category:** Processing.py\
**Created:** [January 6, 2021, 6:33pm UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841 "2021-01-06T18:33:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bobby54](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bobby54/32/9302_2.png) [@Bobby54](https://discourse.processing.org/u/Bobby54)\
**Post date:** [January 6, 2021, 6:33pm UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841/1 "2021-01-06T18:33:26Z")

</div>

When I start the python mode in processing I get following error statemant:

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

I found a website that has a workaround for this issue.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0073817e28bf524cf26070ae452d5eeb2a2a385e.png)  
However I can’t seem to find `pycodestyle.py`. It is not in my `Python 3.9` folder and nowhere in `Processing/modes/PythonMode/...` .  
Does anybody know a solution for one of these issues since that could fix the other issue as well.

---

<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:** [January 6, 2021, 8:37pm UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841/2 "2021-01-06T20:37:28Z")

</div>

It looks like you’re using Python Mode for the Processing IDE? This uses _Jython_ to compile your sketches, not normal Python or Conda. It won’t look for packages or any other configuration settings in your _python3.x_ and _miniconda3_ directories.

However, there’s a `EXTRANEOUS_WHITESPACE_REGEX` line in the Python Mode _pep8.py_ file: `\Users\<user>\Documents\Processing\modes\PythonMode\formatter\pep8.py`. I’m not sure this will help, though.

Someone reported this issue at [https://github.com/jdf/processing.py/issues/383](https://github.com/jdf/processing.py/issues/383), but somehow seemed to resolve it (or it resolved itself). It’s not clear how, though 😕

I can confirm that Python Mode is working fine on my Windows machine. Maybe try moving `\Users\<user>\Documents\Processing\` elsewhere (so that you have a backup), then reinstall Python mode? Maybe a Windows restart, too?

---

<div class="post-metadata">

**Author:** ![Bobby54](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bobby54/32/9302_2.png) [@Bobby54](https://discourse.processing.org/u/Bobby54)\
**Post date:** [January 8, 2021, 6:37pm UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841/3 "2021-01-08T18:37:47Z")

</div>

> [@tabreturn](#):
>
> It looks like you’re using Python Mode for the Processing IDE?

Sorry, forgot to add that, yes, I am using the python mode but I’m running Python 3.9 as well(don’t know if that changes anything).  
Quick update: I started Processing in python mode today because I wanted to try editing pep8.py but I’m not getting the error message any longer. So it looks like it somehow fixed itself.  
Appreciate the help though.

---

<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:** [January 9, 2021, 6:13pm UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841/4 "2021-01-09T18:13:32Z")

</div>

Welcome @Bobby54!

Please note the Python in the Processing IDE’s Python mode is its own Python 2.7 (a Jython interpreter that can talk to the Processing Java tools), so it has nothing to do with your Python 3.9, anaconda or any other Python instalation 🙂

---

<div class="post-metadata">

**Author:** ![Oscar\_Sheen](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@Oscar\_Sheen](https://discourse.processing.org/u/Oscar_Sheen)\
**Post date:** [September 16, 2021, 4:51am UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841/5 "2021-09-16T04:51:25Z")

</div>

Hi tabreturn,

Started reading your book Lean Python Visually a couple of hours ago.

I am having this same problem i.e. the same error message appears. So I closed and restarted it. The error message is gone, but the spacing between the code is off and, more importantly, nothing prints in the console.

For example:

size(500, 500)  
print(‘Hello, World!’)

When run, shows just a blank screen.

I have re-installed it all, but the same problem persists.

Do you have any ideas?

Thanks.

I completed another no starch press book “Python Crash Course” and this used Sublime Text. So I’ve got the basics covered and have noted that another poster wrote that Processing works off its own python IDE version.

---

<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:** [September 16, 2021, 4:58am UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841/6 "2021-09-16T04:58:06Z")

</div>

Hi @Oscar_Sheen

Firstly, make sure that you’re using Processing 3 (version 3.5.4).

Maybe try drawing something simple in the display window, like a white circle:

```auto
size(500, 500)
circle(50, 50, 50)

```

If that works fine, maybe it’s some issue that only affects the console?

---

<div class="post-metadata">

**Author:** ![Oscar\_Sheen](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@Oscar\_Sheen](https://discourse.processing.org/u/Oscar_Sheen)\
**Post date:** [September 16, 2021, 6:41am UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841/7 "2021-09-16T06:41:22Z")

</div>

Downloading Processing 3 (version 3.5.4) fixed the problem.

Note, the same error message came up. But I just closed the program then started it again. I then entered the code per page 5 of your book and it worked straight away.

Looking forward to completing your book and thanks for the prompt reply.

Oscar
