Ask Your Question

rqt won't launch: KeyError: 'label'

asked 2019-12-24 04:09:57 -0500

gallantandre gravatar image

Hello, I am getting a trace error when I try to launch rqt.

Traceback (most recent call last):
      File "/opt/ros/melodic/bin/rqt", line 13, in <module>
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/", line 59, in main
        return super(Main, self).main(argv, standalone=standalone, plugin_argument_provider=plugin_argument_provider, plugin_manager_settings_prefix=str(hash(os.environ['ROS_PACKAGE_PATH'])))
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/", line 596, in main
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/", line 125, in discover
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/", line 81, in add_plugin
        action = QAction(action_attributes['label'],
    KeyError: 'label'

However, rqt launches correctly when I launch my plugin in standalone, e.g.:

rqt --standalone rqt_mypkg

The standard plugins such as rqt_graph and rqt_bag also work correctly.

Any ideas?

edit retag flag offensive close merge delete


Thank you for the comment. But the problem is not with my plugin, it is when I try to launch rqt via rqt command. It seems to have difficulty loading the menu bar.

When I launch my plugin or any other common plugins, there is no problem.

gallantandre gravatar image gallantandre  ( 2020-01-15 08:04:08 -0500 )edit

The second sentence of my previous comment still applies. You can also try rqt --clear-config.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-01-15 08:40:59 -0500 )edit

Hmm, I seem to be missing something. I am not trying to launch a plugin, so would there be a plugin.xml file? Is there a master plugin.xml file somewhere in the installation folder?

Also rqt --clear-config throws the exact same Traceback.

gallantandre gravatar image gallantandre  ( 2020-01-15 08:56:20 -0500 )edit

OH! My bad, it was my plugin that was causing the problem! There was no label field and the rqt_gui could not add my plugin to the list in the menu!

Thank you so much!

gallantandre gravatar image gallantandre  ( 2020-01-15 09:41:56 -0500 )edit

I converted my first comment into an answer. Please consider checking the mail on the left of it to mark it as the right answer if it works for you. Thanks.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-01-15 09:46:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-14 18:14:12 -0500

Dirk Thomas gravatar image

You might be missing the label tag in your plugin xml file? If you could point to your code or update the question with some of the content of your package (maybe the plugin.xml file will do it) we could give you more precise feedback.

edit flag offensive delete link more


Indeed, when the main rqt interface tries to load its menu, it looks for all plugins. For each plugin, it needs a label tag in the plugin.xml file.

The fact that my plugin worked in standalone mode caused my brain to turn into mush apparently.


gallantandre gravatar image gallantandre  ( 2020-01-15 09:55:13 -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


Asked: 2019-12-24 04:09:57 -0500

Seen: 138 times

Last updated: Dec 24 '19