You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're using f-strings (formatted string literals):
print(f"Width {self.width}, height {self.height}, and color {self.color}")
While f-strings were introduced in Python 3.6, Processing.py relies on Jython, which only supports Python 2. Processing.py was never fully ported to Processing 4, and the Python Mode doesn't have an active maintainer. Because of this, there's no straightforward path to supporting Python 3, and we don't expect Python Mode to work reliably in Processing 4.
As it stands, options are as follows:
Use Processing 3.5.4 with Python Mode for Processing 3 and use Python 2 syntax
Switch to py5, which supports Python 3 and is actively developed (outside the PDE for now)
Most appropriate sub-area of Processing 4?
Other (specify if possible)
Processing version
4.4.1
Operating system
Ubuntu 24.04.2 LTS GNOME
Steps to reproduce this
The following code in the image fails at Line 20, in Processing 4.4.1 using Python Mode for Processing 4 4001.
It's just a simple class.
Is Python 3 supported in Processing 4.4.x and higher?
Thank you,
MB
snippet
Additional context
Seems to fail on that print() statement.
It seems to work as a regular python script, outside of
processing but just in case, am I doing something wrong?
Would you like to work on the issue?
No. I don't know how to fix this issue.
The text was updated successfully, but these errors were encountered: