Missing QtSvg module depended upon by rqt_graph

asked 2020-01-24 11:04:13 -0600

acbuynak gravatar image

updated 2020-02-04 17:23:18 -0600

Hello! I am a new ROS User trying to jump in and learn. Any/all guidance is appreciated.

Issue:
rqt_graph & rqt_pack_graph fail to launch on Melodic due to incompatable/missing dependency. Suspect python-pyqt5.qtsvg
Having reinstalled multiple dependent packages and the suspected python-pyqt5.qtsvg issue has not resolved. Final Error Statement: ImportError: No module name QtSvg

rqt itself appears to work fine as I am able to launch it from the terminal.

Background:
Recently have fresh installed Ubuntu 18.04 LTS and ROS Melodic.

System Info:
- - - - - Linux version 5.3.0-26-generic
- - - - - (buildd@lgw01-amd64-039)
- - - - - (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1))
- - - - - #28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019

Attempted Solutions
Found similar rqt_graph failure @ github. But proposed solution did not resolve my issues.

Update 1 - 2/3/2020
After attempting to reinstall ROS1 once, I reinstalled ROS a second time but forced it to use Python3. Then reinstalled rospkg and relevant dependencies in Python3 as well.
This has gotten gotten rqt_graph to work, but I have begun to suspect other errors have been introduced as a result.

Update 2 - 2/4/2020
After two weeks of fighting this issue. I surrendered and reinstalled Ubuntu and ROS from the ground up.
This has resolved my issue with QtSvg and ROS is functioning relatively normal out of the box. Do not know what was the root cause of my original issue.
Considering this unresolved.


Full Error Message:

me@zaphod:~$ rosrun rqt_graph rqt_graph

RosPluginProvider.load(rqt_graph/RosGraph) exception raised in __builtin__.__import__(rqt_graph.ros_graph, [RosGraph]):
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 80, in load
    module = __builtin__.__import__(attributes['module_name'], fromlist=[attributes['class_from_class_type']], level=0)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 39, in <module>
    from python_qt_binding.QtSvg import QSvgGenerator
ImportError: No module named QtSvg

PluginManager._load_plugin() could not load plugin "rqt_graph/RosGraph":
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_handler.py", line 102, in load
    self._load()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 55, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/melodic/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/melodic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 86, in load
    raise e
ImportError: No module named QtSvg
edit retag flag offensive close merge delete

Comments

I think I have root caused the issue to be that pyqt5 is only available for Python3 and not Python2. Since ROS1 is designed for Python2, I don't understand why I am being presented with this issue. I was unable to install pyqt5 onto Python2. Does this seem weird to anyone? I'm lost.

acbuynak gravatar imageacbuynak ( 2020-02-03 10:53:26 -0600 )edit

What platform are you on? Ubuntu Bionic it appears to be built against python 2.7x https://packages.ubuntu.com/bionic/py...

python (<< 2.8)
python (>= 2.7~)
tfoote gravatar imagetfoote ( 2020-02-03 20:40:58 -0600 )edit

@tfoote I was/am running Python 2.7.17 Thank you for your interest here. Unfortunately, I abandoned the solution method and reinstalled my OS & ROS which resolved my issue somehow.

acbuynak gravatar imageacbuynak ( 2020-02-04 17:25:40 -0600 )edit