Ask Your Question
1

No module named defusedxml.xmlrpc

asked 2017-04-26 21:30:14 -0500

DaDaLee gravatar image

I'm using robot_localization offered by ROS downloaded from gihub .It can be compiled and I haven't changed anything of it. When I executed the command: 'roslaunch ekf_template.launch' in a terminal,I got several warnings as follows:

Traceback (most recent call last): File "/home/pantiq/robot/devel/bin/roslaunch", line 6, in exec(fh.read()) File "", line 34, in File "/home/pantiq/robot/devel/lib/python2.7/dist-packages/roslaunch/init.py", line 35, in exec(__fh.read()) File "", line 56, in File "/home/pantiq/robot/src/ros_comm/tools/roslaunch/src/roslaunch/launch.py", line 55, in from roslaunch.nodeprocess import create_master_process, create_node_process File "/home/pantiq/robot/src/ros_comm/tools/roslaunch/src/roslaunch/nodeprocess.py", line 52, in from rosmaster.master_api import NUM_WORKERS File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/init.py", line 35, in from .main import rosmaster_main File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/main.py", line 43, in import rosmaster.master File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/master.py", line 47, in import rosmaster.master_api File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/master_api.py", line 72, in from rosmaster.util import xmlrpcapi File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/util.py", line 48, in from defusedxml.xmlrpc import monkey_patch ImportError: No module named defusedxml.xmlrpc Then I downloaded a folder named defusedxml from a website,and put it in the robot_localization/src path,still it doesn't work.

What should I do with it?Shall I custimaze it or do something else? I do appreciate it if anyone can help me out.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-04-27 01:27:21 -0500

ahendrix gravatar image

It seems like you're missing the defulsedxml python package; and it looks like your probably can't run any roslaunch or roscore commands as a result.

defulsedxml should have been installed when you installed ROS. If you're running Ubuntu, you can reinstall it by running sudo apt-get install python-defusedxml

edit flag offensive delete link more

Comments

Thank you so much that your proposal really works.But here pops up another problem: After running the command: roslaunch ekf_template.launch , I run rostopic echo /odometry/filtered in another terminal.Then I got nothing.Does it mean that the node isn't operating at all or something else goes wrong?

DaDaLee gravatar imageDaDaLee ( 2017-04-27 01:57:07 -0500 )edit
2

I'm not very familiar with robot_localization, so I'm not sure what's wrong. That sounds like a topic for a new question.

ahendrix gravatar imageahendrix ( 2017-04-27 02:04:47 -0500 )edit

Thank you Ahendrix.Maybe I should raise a new question about it.

DaDaLee gravatar imageDaDaLee ( 2017-04-27 02:08:57 -0500 )edit
2

answered 2019-01-26 08:02:40 -0500

Preeti Mukherjee gravatar image

Even I was facing a similar error. Running pip install defusedxml helped me!

edit flag offensive delete link more

Comments

Please be aware of the downsides to using pip to install Python packages on a platform which normally uses apt (ie: no automatic upgrades, no visibility to the package manager, etc).

In general, use of pip for managing Python dependencies of (core) ROS packages is discouraged on Debian based platforms.

There are certainly legitimate use-cases for it, but it should not be regarded an appropriate solution to the problem reported by the OP.

gvdhoorn gravatar imagegvdhoorn ( 2019-10-08 03:45:04 -0500 )edit

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: 2017-04-26 21:30:14 -0500

Seen: 5,786 times

Last updated: Apr 27 '17