Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

syntax error on line 303 #1

Open
fboerman opened this issue Oct 7, 2013 · 6 comments
Open

syntax error on line 303 #1

fboerman opened this issue Oct 7, 2013 · 6 comments
Assignees

Comments

@fboerman
Copy link

fboerman commented Oct 7, 2013

i like the idea of this but when i import the robot class as in the example i get a syntaxerror on line 303 with the print e statement. This is in both 2.7.5 and the 3.3 python version.

@ghost ghost assigned chriskiehl Oct 7, 2013
@chriskiehl
Copy link
Owner

Hey WillieWonka,

Could you post (a) the exact code you used which produced the error, and (b) the full printout of the error?

Thanks!

@fboerman
Copy link
Author

fboerman commented Oct 7, 2013

the code:

from pyrobot import Robot

robot = Robot()

robot.sleep(5)

robot.add_to_clipboard("\"")

for n in range(0, 157):
    robot.paste()
    robot.press("down_arrow")
    robot.release("down_arrow")

the error is just a general error from the commandline at that line about the syntax of

print e

@chriskiehl
Copy link
Owner

One quick issue I see is that there is no press() method in the robot class. Try replacing robot.press('down_arrow') with robot.key_press('down_arrow').

Let me know if that clears anything up (everything ran OK for me once I subbed in the right method names).

Based on your above code, I'm not entirely sure what's throwing the syntax error on line 303. In PyRobot, that line is part of the take_screenshot method, which you don't appear to be calling.

@rogueeva
Copy link

rogueeva commented Aug 7, 2014

i have the simmilar error - SyntaxError on line 535

image

@gcq
Copy link
Contributor

gcq commented Aug 7, 2014

@rogueeva you are probably using python3. Pyrobot is a python2 only lib.

@rogueeva
Copy link

rogueeva commented Aug 7, 2014

@gcq i've got lost in my env variables, true, that error is caused by using python3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants