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

rqt_graph not shown in window

asked 2014-02-24 23:03:55 -0500

sara.ershadi gravatar image

updated 2014-07-17 00:01:04 -0500

130s gravatar image

Hi ,

I am new in ROS .

I am using ubuntu 12.04 LTS . ROS Hydro

I want to test the tuturial 6 about undrstanding ROS topics.

I can run the first command . but in part when I want to see the output of rosrun rqt_graph rqt_graph

in the opened window I can't see the map of rqt graph.

the opened window is empty but there are some button in it.

sara@sara:~$ rosrun rqt_graph rqt_graph
Couldn't import dot_parser, loading of dot files will not be possible.
PluginHandlerDirect._restore_settings() plugin "rqt_graph/RosGraph#0" raised an exception:
Traceback (most recent call last):
  File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_gui/", line 116, in _restore_settings
    self._plugin.restore_settings(plugin_settings_plugin, instance_settings_plugin)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_graph/", line 202, in restore_settings
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_graph/", line 226, in _refresh_rosgraph
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_graph/", line 259, in _update_graph_view self._redraw_graph_view()
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_graph/", line 292, in _redraw_graph_view same_label_siblings=True)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_dotgraph/", line 228, in dotcode_to_qt_items graph = pydot.graph_from_dot_data(dotcode.encode("ascii", "ignore"))
  File "/usr/lib/pymodules/python2.7/", line 199, in graph_from_dot_data
    return dot_parser.parse_dot_data(data)
NameError: global name 'dot_parser' is not defined

What should I do ?

Thanks in advance Sarah

edit retag flag offensive close merge delete


I also got the same problem with you. I am using Ubuntu 13.10 and ROS Hydro, installed from source a week ago.

Veerachart gravatar image Veerachart  ( 2014-03-03 19:14:02 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2017-04-15 14:15:44 -0500

burtbick gravatar image

I know that this is an older topic and that there was an answer given. But in my case that answer did NOT work.

I'm running indigo installed on Linux Mint 17.1 (based on Ubuntu 14.04 Trusty). I was having the same error as listed above and all the solutions I found didn't help. Until I did some digging.

I found that due to having more than one Python version installed the pip that was running by default was updating a different version of Python than ROS was using. So when I tried un-installing pyparsing and pydot and then installing newer versions there was no apparent change in behavior.

Trying to downgrade pyparsing gave an error and would not install the 1.5.7 version.

What I did find was that I had to explicitly run the version of pip from where the version of Python 2.7 being used by ROS was running on my system.

In my case this was sudo /usr/bin/pip install --upgrade pydot This caused pyparsing and pydot to be updated. Note that I got a message about not uninstalling pydot due to it being owned by OS, but this didn't impact the fix

Once the update completed rqt_graph is now working on my system.

You can do: which python To locate the directory where python is running from and double check where your pip is by doing: which pip

Both pip and python should be on the same path (e.g. /usr/bin in my case) but the default pip binary was being found at /usr/local/bin and not /usr/bin.

So I thought I would add this note for anyone who happens to be tearing their hair out with a similar issue.


edit flag offensive delete link more

answered 2014-03-06 19:35:49 -0500

Veerachart gravatar image

updated 2014-03-06 19:37:13 -0500

Well, I found this and tried according to the top comment. It works! (You may need to add sudo.) Hope it also works with yours. (I cannot post to answer.)

edit flag offensive delete link more


In case you did not install by pip, try "sudo apt-get remove python-pyparsing".

Veerachart gravatar image Veerachart  ( 2014-03-06 20:33:07 -0500 )edit

Hi @Veerachart can you give all steps you used to resolve the problem? I'm also using Ubuntu 13.10 with Hydro. Thanks!

TSC gravatar image TSC  ( 2014-03-31 12:42:22 -0500 )edit

Never mind: just follow the top comment (1. $ sudo pip uninstall pyparsing 2. $ sudo pip install -Iv 3. $ pip install pydot)

TSC gravatar image TSC  ( 2014-04-01 00:53:30 -0500 )edit

I am having the same issue as above, and I tried to do this, but pip stopped working after i uninstalled pyparsing.

LikeSmith gravatar image LikeSmith  ( 2016-04-25 14:35:46 -0500 )edit

answered 2016-10-05 04:06:52 -0500

ganam gravatar image

I found this answer in some Asian blog and it worked with me

the steps were :

$ sudo pip uninstall pyparsing

$ pip install -Iv

$ sudo pip install pydot

$ rosrun rqt_graph rqt_graph
edit flag offensive delete link more

Question Tools



Asked: 2014-02-24 23:03:55 -0500

Seen: 4,596 times

Last updated: Apr 15 '17