Ask Your Question
0

cannot run ros commands

asked 2011-10-08 22:31:39 -0500

vasp gravatar image

Hi! whenever i try to run ros commands such as roscore or rosmake, it keeps popping up >>

File "/opt/ros/electric/ros/bin/roscore", line 34, in <module> from ros import roslaunch File "/opt/ros/electric/ros/core/roslib/src/ros/__init__.py", line 55 except roslib.packages.InvalidROSPkgException as e: ^ SyntaxError: invalid syntax

I would b glad if any of you can solve this problem.my default python version is 2.6.6. thanks in advance!

edit retag flag offensive close merge delete

Comments

Tell us more; which sort of system are you on?
Mac gravatar image Mac  ( 2011-10-09 08:27:38 -0500 )edit
i'm using Ubunthu 10.10 and ros electric package. not only ros core..all the roscommands like rosdep, roswtf also giving me the same error.it was working fine last time. i didnt even update the versions. but since it's not working i tried updating the ubunthu, python version and ros package. but i still hav the same problem.
vasp gravatar image vasp  ( 2011-10-09 16:12:03 -0500 )edit
Are you sure that your ROS binaries actually use Python 2.6? The Syntax Error exception indicates otherwise. Do you have Python 3.x installed?
roehling gravatar image roehling  ( 2011-10-10 01:22:13 -0500 )edit
I think it's due to a Python 2.6 -3 conflict. Röhling maybe you should post your comment as an answer.
Lorenzo Riano gravatar image Lorenzo Riano  ( 2011-10-10 01:31:37 -0500 )edit
I just installed Python3.2 (Ubuntu 11.04), ran some ROS stuff with it, and I got an AttributeError exception. So while I agree with Lorenzo that this looks like some sort of Python version conflict, I am unable to reproduce the same error.
roehling gravatar image roehling  ( 2011-10-10 02:23:01 -0500 )edit
The syntax error would tend to indicate an older, not newer Python.
kwc gravatar image kwc  ( 2011-10-10 12:42:28 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2011-11-18 05:47:09 -0500

Wim gravatar image

Are you sure that your ROS binaries actually use Python 2.6? The Syntax Error exception indicates otherwise. Do you have Python 3.x installed? - Röhling (Oct 10)

I think it's due to a Python 2.6 -3 conflict. Röhling maybe you should post your comment as an answer. - Lorenzo Riano (Oct 10)

I just installed Python3.2 (Ubuntu 11.04), ran some ROS stuff with it, and I got an AttributeError exception. So while I agree with Lorenzo that this looks like some sort of Python version conflict, I am unable to reproduce the same error. - Röhling (Oct 10)

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

Stats

Asked: 2011-10-08 22:31:39 -0500

Seen: 425 times

Last updated: Nov 18 '11