rqt python plugin fails to load in Kinetic Kame [closed]
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!
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?
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:
rosdistro: kinetic, rosversion: 1.12.2
This version of the python "tutorial" is however working (cpp not): https://github.com/ipa-lth/rqt_mypkg.git
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.