python syntax error for rosrun .py script
Hello I'm a noob at python, I downloaded this github package (turtlesim_hunter) Then when I rosrun I get a syntax error:
knives@knives:~/catkin_ws/src/turtlesim_hunter/src/turtlesim_hunt/Scripts$ rosrun turtlesim_hunt hunt.py
File "/home/knives/catkin_ws/src/turtlesim_hunter/src/turtlesim_hunt/Scripts/hunt.py", line 151
print "Found #" + str(huntedTurtles) + " after " + str(finalTime) + " Current Avg: " + str(totalHuntTime / huntedTurtles)
^
SyntaxError: invalid syntax
The issue is at line 151 in the hunt.py script:
https://github.com/tiedyedguy/turtles...
print "Found #" + str(huntedTurtles) + " after " + str(finalTime) + " Current Avg: " + str(totalHuntTime / huntedTurtles)
I don't know whats wrong and I can't google myself to a specific answer, is the issue that this was written with python 3 and I only have python 2.7 installed? I highly doubt this guy has an error in his code since it's working for him:
Try commenting out that line (put a
#
in front of it), and if you want to see what it was printing gradually restore it - just print the huntedTurtles bit and put the hash after but before the plus sign with the rest of it, then move the hash to the right so more and more of the line will print