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

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>
        sys.exit(main.main())
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/main.py", 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/main.py", line 596, in main
        plugin_manager.discover()
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_manager.py", line 125, in discover
        self._plugin_menu.add_plugin(plugin_descriptor)
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_menu.py", line 81, in add_plugin
        action = QAction(action_attributes['label'], menu_manager.menu)
    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

Comments

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
1

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

Comments

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.

Thanks

gallantandre gravatar image gallantandre  ( 2020-01-15 09:55:13 -0500 )edit

Question Tools

Stats

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

Seen: 368 times

Last updated: Dec 24 '19