theriley106 / SneakerBotTutorials

Open Source SneakerBot created as a supplement to my "Creating a Sneaker Bot in Python" Youtube Series
https://www.youtube.com/playlist?list=PL3fpqcQTK0f9sACDQstvjxbHzD1L_gr__
MIT License
621 stars 137 forks source link

Python syntax error, line 72, main.py #4

Closed moose99 closed 6 years ago

moose99 commented 6 years ago

I'm using python 36 and am getting this error on line 72 of main.py because "print exp" should be "print(exp)":

Encountered "exp" at line 72, column 10. Was expecting one of: <NEWLINE> ... "(" ... "[" ... ";" ... "," ... "." ... ":" ... "+" ... "-" ... "*" ... "/" ... "//" ... "<<" ... ">>" ... "%" ... "^" ... "|" ... "&" ... "=" ... ">" ... "<" ... "==" ... "<=" ... ">=" ... "!=" ... "+=" ... "-=" ... "*=" ... "@=" ... "/=" ... "//=" ... "%=" ... "&=" ... "|=" ... "^=" ... "<<=" ... ">>=" ... "**=" ... "or" ... "and" ... "not" ... "is" ... "in" ... "if" ... "@" ... ";" ... "," ... main.py /SneakerBotTutorials

theriley106 commented 6 years ago

Hey Moose!

This is actually Python 2.7, so the syntax error is caused by the version difference.

In Python 3.x, the print function has to be called with:

print(string)

Whereas in Python 2.x it can be called with:

print string

or

print(string)

I'm more comfortable writing in 2.7, however I'll probably eventually switch this over. For now, if you run it in a 2.x environment the syntax error should go away.