Processing.py-Bugs icon indicating copy to clipboard operation
Processing.py-Bugs copied to clipboard

circle() not exist. NameError: global name 'circle'

Open spencer-park opened this issue 4 years ago • 4 comments

def setup():
    size(400,400)
    
def draw():
    circle(56, 46, 55)

NameError: global name 'circle' is not defined

def setup():
    size(400,400)
    
def draw():
    square(10, 10, 55)

NameError: global name 'square' is not defined

I use processing 3.5.4 However, there is a circle(), square() function in the reference. (update log Fri Aug 16 21:51:57 2019.) https://py.processing.org/reference/circle.html

spencer-park avatar May 06 '20 16:05 spencer-park

Which version of Python Mode do you have?

You can find this by click on the dropdown on the top right, and clicking Add Module. That should open the Contribution Manager window with the Module tab selected. Pick Python Mode for Processing 3 and it will say your installed version in the bottom left.

I'm guessing that you may have an older version that does not support circle()yet.

Latest version: Screen Shot 2020-05-06 at 10 41 54 AM

FeXd avatar May 06 '20 16:05 FeXd

I am getting the same error while using the processing-py.jar file to execute my script from the command line (processing-py.jar downloaded today, 2020-08-02, I don't know how to get its version number). The Python Mode for the IDE does work fine in my case (version 3059). Are both (processing-py.jar and IDE Python Mode) out of sync somehow? Many thanks for all the great work!

msoriaro avatar Aug 02 '20 20:08 msoriaro

I have the exact same problem. The processing-py.jar version seems to be an older version; for me the jar it's v3017, while the IDE version seems to be v3063.

harshaxnim avatar Sep 15 '20 16:09 harshaxnim

I think this might be related / relevant: https://github.com/jdf/processing-py-site/issues/142#issuecomment-574921841

FeXd avatar Sep 15 '20 17:09 FeXd