ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

import in rosgraph/masterapi.py failing

asked 2015-07-05 20:29:57 -0500

Mica gravatar image

updated 2015-07-06 18:19:51 -0500

Hi,

I am getting an error in the rosgraph/masterapi.py file.

I am trying to run the turtlebot_arm_bringup arm.launch from answer17 and am also using their arbotix package. I am using these packages as they appear to provide support for the pincher arm I am using.

I am using Indigo on Ubuntu 14.04, with Python 2.7.6.

The error I get is:

$ roslaunch turtlebot_arm_bringup arm.launch 

Traceback (most recent call last):
File "/opt/ros/indigo/bin/roslaunch", line 34, in <module>
import roslaunch
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 50, in <module>
from . import core as roslaunch_core
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/core.py", line 47, in <module>
from xmlrpclib import MultiCall, ServerProxy
 File "/usr/lib/python2.7/xmlrpclib.py", line 145, in <module>
import httplib
  File "/usr/lib/python2.7/httplib.py", line 79, in <module>
import mimetools
  File "/usr/lib/python2.7/mimetools.py", line 6, in <module>
import tempfile
File "/usr/lib/python2.7/tempfile.py", line 32, in <module>
import io as _io
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
from .client import spin, myargv, init_node, \
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 49, in <module>
import rosgraph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/__init__.py", line 36, in <module>
from . masterapi import Master, MasterFailure, MasterError, MasterException

File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 43, in <module>
from xmlrpclib import ServerProxy  # Python 2.x
ImportError: cannot import name ServerProxy

So it looks like python can find xmlrpclib.py (so don't think it's a PYTHONPATH issue) but I'm not sure why it can't import ServerProxy (it exists in this file). Any ideas on what is going wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-28 04:19:46 -0500

Mica gravatar image

Turns out a few of the ros commands were missing (when I uninstalled a Turtlebot package using sudo apt-get install it deleted some other packages and was perhaps the cause of this...).

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-07-05 20:29:57 -0500

Seen: 376 times

Last updated: Jul 28 '15