Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(allLines[5])? #44

Open
hopezh opened this issue Oct 7, 2020 · 0 comments

Comments

@hopezh
Copy link

hopezh commented Oct 7, 2020

I got the following error following the simple demo code as shown on GitHub for the GH_CPython component. May I ask why this error is related to the print function which I didn't use at all?

Traceback (most recent call last):
  File "C:\GH_CPython\PythonFileWritten_2.py", line 36, in <module>
    import Grasshopper as gh
  File "C:\GH_CPython\Grasshopper.py", line 99
    print allLines[5]
                 ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(allLines[5])?

The code is here:


""" 
Python Script
Created on  Wednesday October 2020 01:09:39 
@author:  AAA 

[desc]
Description of the plugin Here
Write here any thing... 
[/desc]

ARGUMENTS:
----------
<inp> 
    _input :[required] - [type = int] - [default = None] 
    Descripe your input here 
        * bullet point.
        * bullet point
</inp>
<inp>
    Other inputs go here ...
</inp>

RETURN:
----------
    <out>
        output_ : indicate your output description here. \n refers to a new line.
        a : 
        b : 
    </out>

"""

import Grasshopper as gh

output_ = gh.addPoint(0, 4, 2)
a = gh.addPoint(-5, 10, 0)

p1 = gh.Point(0, 0, 0)
p2 = gh.Point(5, 5, 5)

b = gh.addLine(p1, p2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant