From 423d3c7ee4a5516dd97b77ad914dc5b5d26102f8 Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Sun, 8 Jun 2025 13:52:48 +0900 Subject: [PATCH] [smach_viewer] fix bug in noble: Traceback (most recent call last): File "/home/obinata/ros/catkin_ws/devel/lib/smach_viewer/smach_viewer.py", line 15, in exec(compile(fh.read(), python_script, 'exec'), context) File "/home/obinata/ros/catkin_ws/src/ros-visualization/executive_smach_visualization/smach_viewer/scripts/smach_viewer.py", line 89, in from smach_viewer.xdot import wxxdot File "/home/obinata/ros/catkin_ws/src/ros-visualization/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/__init__.py", line 1, in from . import wxxdot File "/home/obinata/ros/catkin_ws/src/ros-visualization/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/wxxdot.py", line 30, in from xdot.dot.parser import * File "", line 1410, in _handle_fromlist File "", line 1400, in _handle_fromlist TypeError: 'AttributeError' object is not iterable --- smach_viewer/src/smach_viewer/xdot/wxxdot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smach_viewer/src/smach_viewer/xdot/wxxdot.py b/smach_viewer/src/smach_viewer/xdot/wxxdot.py index 7ff6eee..dc32cef 100644 --- a/smach_viewer/src/smach_viewer/xdot/wxxdot.py +++ b/smach_viewer/src/smach_viewer/xdot/wxxdot.py @@ -19,12 +19,14 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . +import sys + try: # intentionally use from xdot, instead of from .xdot, because we want to use local xdot for Python2 and system xdot for Python3 from xdot.ui.elements import * from xdot.ui.animation import * from xdot.dot.lexer import * - from xdot.dot.parser import * + from xdot.dot.parser import XDotParser import subprocess except: from xdot import *