Ask Your Question
0

AttributeError: 'module' object has no attribute 'main'

asked 2011-12-03 16:51:47 -0500

updated 2012-03-16 15:23:57 -0500

I installed ROS via the instructions on installing on Mac OSX with no errors during installation. I need ROS to work with Python 3.2.2 (it needs to integrate with MORSE and therefore with Blender, and they both use 3.2.2), so I fixed all of the generic print statements needing parentheses, but then I get to this error. I've uninstalled and reinstalled, as well as the ever typical rebooting, and it is still not fixed.

Traceback (most recent call last): File "/Users/o2wtf2o/ros/ros/bin/roscore", line 36, in <module> roslaunch.main(['roscore', '--core']+sys.argv[1:]) AttributeError: 'module' object has no attribute 'main'

edit retag flag offensive close merge delete

Comments

FYI: you still need to run the ROS command-line tools with Python 2. The MORSE/Blender fixes only apply the the underlying communication libraries. Thus, run MORSE with Py3k, run ROS with Python 2.

kwc ( 2012-02-20 05:49:32 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2012-05-27 07:20:11 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

From @kwc

FYI: you still need to run the ROS command-line tools with Python 2. The MORSE/Blender fixes only apply the the underlying communication libraries. Thus, run MORSE with Py3k, run ROS with Python 2.

edit flag offensive delete link more
1

answered 2012-02-20 03:36:20 -0500

What version of ROS are you trying to use? As far as I know many of the Python3 compatibility fixes were integrated into ROS Electric. You might try to update to that version.

If you are using Electric, how did you install Python3 and can you provide us with the PYTHON_PATH?

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

[hide preview]

Stats

Asked: 2011-12-03 16:51:47 -0500

Seen: 466 times

Last updated: May 27 '12