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

Error in Understanding ROS Topics Tutorial - rosrun rqt_graph rqt_graph error

asked 2021-09-23 10:43:28 -0500

zadorpataki gravatar image

I am following the tutorial http://wiki.ros.org/ROS/Tutorials/Und...

I am using Ubuntu 20.04, and am using ROS noetic.

I have followed the tutorial step by step and after I run the command:

rosrun rqt_graph rqt_graph

I run into the following error:

PluginManager._discover() force discovery of plugins
RospkgPluginProvider._find_plugins() crawling for plugins of type 'qt_gui'
CompositePluginProvider.discover() could not discover plugins from provider "<class 'rqt_gui.rospkg_plugin_provider.RospkgPluginProvider'>":
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/composite_plugin_provider.py", line 57, in discover
    plugin_descriptors = plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 67, in discover
    plugin_descriptors += self._parse_plugin_xml(package_name, plugin_xml)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 128, in _parse_plugin_xml
    for library_el in root.getiterator('library'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'

CompositePluginProvider.discover() could not discover plugins from provider "<class 'qt_gui.recursive_plugin_provider.RecursivePluginProvider'>":
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/composite_plugin_provider.py", line 57, in discover
    plugin_descriptors = plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/recursive_plugin_provider.py", line 53, in discover
    plugin_descriptors = self._plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 67, in discover
    plugin_descriptors += self._parse_plugin_xml(package_name, plugin_xml)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 128, in _parse_plugin_xml
    for library_el in root.getiterator('library'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'

RospkgPluginProvider._find_plugins() crawling for plugins of type 'rqt_gui'
CompositePluginProvider.discover() could not discover plugins from provider "<class 'qt_gui.recursive_plugin_provider.RecursivePluginProvider'>":
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/composite_plugin_provider.py", line 57, in discover
    plugin_descriptors = plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/recursive_plugin_provider.py", line 53, in discover
    plugin_descriptors = self._plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 67, in discover
    plugin_descriptors += self._parse_plugin_xml(package_name, plugin_xml)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 128, in _parse_plugin_xml
    for library_el in root.getiterator('library'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'

qt_gui_main() found no plugin matching "rqt_graph.ros_graph.RosGraph"
try passing the option "--force-discover"

In a different posts listed below:

https://github.com/ros-visualization/... https://answers.ros.org/question/3665...

the accepted solution: is that I change getiterator to iter in /opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py. I can locate this file however my file is read-only!

What can I do? I can not find any solutions to this.

edit retag flag offensive close merge delete

Comments

Please tell us what version of python3 you are running.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-09-23 12:18:58 -0500 )edit

Can you sudo gedit the file?

Have you installed ros-noetic-rqt-graph? The link to the tutorial is not working for some reason

osilva gravatar image osilva  ( 2021-09-23 22:43:22 -0500 )edit

@Mike Scheutzow I am using python3 3.9.1

zadorpataki gravatar image zadorpataki  ( 2021-09-24 04:14:04 -0500 )edit

@osilva yes I have installed this. http://wiki.ros.org/ROS/Tutorials/Usi... here is the link. Perhaps it works now

zadorpataki gravatar image zadorpataki  ( 2021-09-24 18:03:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-24 07:47:24 -0500

Mike Scheutzow gravatar image

In my VM with noetic, python3 is version 3.8.10. You have probably run dist-upgrade or manually upgraded python3. Either of these actions are going to cause problems like this one with the pre-built ros packages. For the smoothest ros experience, you have to keep to the standard ubuntu release.

You can build ros packages you need from source code, but it's going to be more work for you.

edit flag offensive delete link more

Comments

I can not find a way to change my python version... do you have any idea how to do this? Nothing I find online works.

zadorpataki gravatar image zadorpataki  ( 2021-09-24 18:02:36 -0500 )edit

Make sure the ubuntu package python3.8 is installed. Make sure the symbolic link /usr/bin/python3 points to python3.8. If you change this, be aware that whatever you installed that depends on python 3.9 may break.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-09-25 07:08:00 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-09-23 10:43:28 -0500

Seen: 780 times

Last updated: Sep 24 '21