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

Error when running rqt_graph. No module named "error"

asked 2020-02-27 09:04:40 -0500

KSJ gravatar image

updated 2020-02-27 13:39:36 -0500

gvdhoorn gravatar image

I'm running my model on ROS melodic.

Followed this tutorial to watch my dynamic graph of topics and nodes: http://wiki.ros.org/ROS/Tutorials/Und...

when I run rosrun rqt_graph rqt_graph I get an error:

File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in <module>
    import rospkg
ModuleNotFoundError: No module named 'rospkg'

In order to fix it I changed my PYTHONPATH as it suggested to do in this issue: https://answers.ros.org/question/2432... (But I don't use anaconda though)

Then I got another error:

File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 2, in <module>
    from error import *
ModuleNotFoundError: No module named 'error'

How can I fix that?

EDIT: I figured out that it is related to python version, I use python3.7.6 What version should I use instead? I tried 2.7.13 and it did not help

edit retag flag offensive close merge delete

Comments

If you use Python 3 you should install the Debian package python3-rospkg-modules. But note: ROS Melodic does not officially support Python 3 but only Python 2.7. When using Python 2.7 you should have the Debian package python-rospkg installed.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-02-28 10:44:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-31 11:34:36 -0500

KSJ gravatar image

This error occurred because I used wrong version of python.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-02-27 09:04:40 -0500

Seen: 478 times

Last updated: Mar 31 '20