Ask Your Question
0

Unable to lunch .py examples

asked 2018-02-07 12:33:01 -0600

seg gravatar image

When I try to lunch the examples I get errors with some examples. I am abel tu lunch succesfully Cameraserver + Opencvdemo for instance but, when I try Cameraserver python + Cameraview it produces an error in print line. This is due to is written in python2 instead of python3. However, I can lunch python2 in terminal and run code so, I don't know why it doesn't work.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2018-02-08 03:44:43 -0600

aitormf gravatar image

cameraserver_py is a shell script that only contain the following commad:

python /opt/jderobot/share/jderobot/python/cameraserver_py/cameraserver.py $*

if you want to launch this driver with python directly run:

python2 /opt/jderobot/share/jderobot/python/cameraserver_py/cameraserver.py cameraserver_py.yml

or go to /opt/jderobot/share/jderobot/python/cameraserver_py and run :

python2 cameraserver.py cameraserver_py.yml
edit flag offensive delete link more

Comments

It works, Thanks

seg gravatar imageseg ( 2018-02-08 04:18:25 -0600 )edit
0

answered 2018-02-07 14:10:17 -0600

fqez gravatar image

How are you launching the example? like

python cameraserver_py cameraserver_py.yml

or

python2 cameraserver_py cameraserver_py.yml

?

edit flag offensive delete link more
0

answered 2018-02-07 14:33:09 -0600

seg gravatar image

Neither of them works.

I add message errors

sergio@sergio-GL553VD:/opt/jderobot/bin$ cameraserverpy cameraserverpy.yml File "/opt/jderobot/share/jderobot/python/cameraserver_py/cameraserver.py", line 37 print name, ":", endpoint ^ SyntaxError: Missing parentheses in call to 'print'

sergio@sergio-GL553VD:/opt/jderobot/bin$ python cameraserverpy cameraserverpy.yml File "cameraserverpy", line 3 python /opt/jderobot/share/jderobot/python/cameraserverpy/cameraserver.py $* ^ SyntaxError: invalid syntax

sergio@sergio-GL553VD:/opt/jderobot/bin$ python2 cameraserverpy cameraserverpy.yml File "cameraserverpy", line 3 python /opt/jderobot/share/jderobot/python/cameraserverpy/cameraserver.py $* ^ SyntaxError: invalid syntax

Other examples I'm able to lunch from /home/sergio but python files isn't possible too

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-02-07 12:33:01 -0600

Seen: 21 times

Last updated: Feb 08