rqt python plugin fails to load in Kinetic Kame [closed]

asked 2016-09-08 02:32:48 -0600

LorenzH gravatar image

I moved from Indigo to Kinetic these days. AFAIK I updated our code to use qt5 instead of qt4 (essentially importing "QWidget" from "python_qt_binding.QtWidgets" and some comparable changes).

However, the rqt_plugin is not loaded, when selected in rqt. The output:

PluginManager._load_plugin() could not load plugin "frame_editor/Frame Editor":
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin_handler.py", line 99, in load
    self._load()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 54, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui_py/ros_py_plugin_provider.py", line 60, in load
    return super(RosPyPluginProvider, self).load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 94, in load
    return class_ref(plugin_context)
  File "/home/lorenz/catkin_ws/src/wp06_multimodal_robot_programming_toolbox/frame_editor/src/frame_editor/rqt_editor.py", line 42, in __init__
    super(FrameEditorGUI, self).__init__(context)
  File "/home/lorenz/catkin_ws/src/wp06_multimodal_robot_programming_toolbox/toolbox/src/toolbox/project_plugin.py", line 13, in __init__
    super(ProjectPlugin, self).__init__(context)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin.py", line 43, in __init__
    super(Plugin, self).__init__(context)
TypeError: __init__() takes exactly 2 arguments (1 given)

Any ideas? Thanks for your help!

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by LorenzH
close date 2016-09-12 05:41:40.988539

Comments

Please provide more information. What Qt version are you using, what version of PyQt? Can you provide a link to your code? Do other rqt plugins work or does it affect all?

Dirk Thomas gravatar imageDirk Thomas ( 2016-09-08 10:24:10 -0600 )edit

Other (not custom) plugins seem to be working. I will try to get you access to the code, but for now, I can not, unfortunately. Here some general infos:

LorenzH gravatar imageLorenzH ( 2016-09-09 01:55:28 -0600 )edit

rosdistro: kinetic, rosversion: 1.12.2

$ qmake --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib/x86_64-linux-gnu

>>>print python_qt_binding.QT_BINDING
pyqt
>>> print python_qt_binding.QT_BINDING_VERSION
5.5.1
LorenzH gravatar imageLorenzH ( 2016-09-09 01:57:16 -0600 )edit

This version of the python "tutorial" is however working (cpp not): https://github.com/ipa-lth/rqt_mypkg.git

LorenzH gravatar imageLorenzH ( 2016-09-09 02:25:26 -0600 )edit

The problem did not come from rqt and had nothing to do with it. It probably came from the qt4-qt5 change over. The traceback showed a wrong path (The __init__() shown is not the one which crashed). However, I was able to resolve it.

LorenzH gravatar imageLorenzH ( 2016-09-12 05:41:19 -0600 )edit