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

When ever I run roscore, this error prompts. How can I fix this issue ? Please provide a solution.

asked 2021-02-23 22:49:17 -0500

Sreevalsan gravatar image

updated 2022-05-28 16:50:52 -0500

lucasw gravatar image

Error:

   Traceback (most recent call last):
      File "/opt/ros/melodic/bin/roscore", line 36, in <module>
        from rosmaster.master_api import NUM_WORKERS
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/__init__.py", line 35, in <module>
        from .main import rosmaster_main
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/main.py", line 43, in <module>
        import rosmaster.master
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/master.py", line 47, in <module>
        import rosmaster.master_api
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 72, in <module>
        from rosmaster.util import xmlrpcapi
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmaster/util.py", line 48, in <module>
        from defusedxml.xmlrpc import monkey_patch
    ModuleNotFoundError: No module named 'defusedxml'

I'm using Ubuntu 18.04. and tried installing defusedxml. but no use

Thanks in advance

edit retag flag offensive close merge delete

Comments

1

Try running with PIP

sudo pip install defusedxml
Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-02-24 06:33:52 -0500 )edit

wow, thank you @Ranjith, it got worked, im really happy. Thank you a lot......

Sreevalsan gravatar image Sreevalsan  ( 2021-02-24 06:46:13 -0500 )edit

I would recommend you please look at this link, It is providing a proper explanation.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-02-24 07:06:31 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-02-24 06:56:32 -0500

Ranjit Kathiriya gravatar image

updated 2021-02-24 06:57:28 -0500

Try running with PIP

sudo pip install defusedxml

edit flag offensive delete link more

Comments

If you got your answer then mark this answer as correct by ticking it, so that can be helpful for other users.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-02-24 07:06:34 -0500 )edit
0

answered 2021-02-24 04:28:15 -0500

lmiller gravatar image

Maybe this post would help you.

Try running this command: sudo apt-get install python-defusedxml

edit flag offensive delete link more

Comments

sorry to mention that I have done the command earlier. but no use

Sreevalsan gravatar image Sreevalsan  ( 2021-02-24 04:49:33 -0500 )edit

Question Tools

Stats

Asked: 2021-02-23 22:49:17 -0500

Seen: 1,061 times

Last updated: May 28 '22