Ask Your Question

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( File "", line 34, in File "/home/pantiq/robot/devel/lib/python2.7/dist-packages/roslaunch/", line 35, in exec( File "", line 56, in File "/home/pantiq/robot/src/ros_comm/tools/roslaunch/src/roslaunch/", line 55, in from roslaunch.nodeprocess import create_master_process, create_node_process File "/home/pantiq/robot/src/ros_comm/tools/roslaunch/src/roslaunch/", line 52, in from rosmaster.master_api import NUM_WORKERS File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/", line 35, in from .main import rosmaster_main File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/", line 43, in import rosmaster.master File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/", line 47, in import rosmaster.master_api File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/", line 72, in from rosmaster.util import xmlrpcapi File "/home/pantiq/robot/src/ros_comm/tools/rosmaster/src/rosmaster/", 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

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


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

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

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

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


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

Seen: 5,462 times

Last updated: Apr 27 '17