Rosanswers logo


My development environment is Ubuntu14.04 and ROS Indigo.

I tried to execute ROS service as a smach state and it works correctly.

But, when I run smach_viewer, the following errors occured and print nothing. (I think smach_viewer can print this graph in Ubuntu12.04 + ROS Hydro :'()

error message

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/ros/indigo/lib/smach_viewer/smach_viewer.py", line 848, in _update_graph
  File "/opt/ros/indigo/lib/smach_viewer/smach_viewer.py", line 866, in set_dotcode
    if self.widget.set_dotcode(dotcode, None):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/wxxdot.py", line 455, in set_dotcode
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/wxxdot.py", line 483, in set_xdotcode
    self.graph = parser.parse()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 1146, in parse
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 951, in parse
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 960, in parse_graph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 993, in parse_stmt
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 974, in parse_subgraph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 993, in parse_stmt
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 974, in parse_subgraph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 1009, in parse_stmt
    self.handle_node(id, attrs)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 1120, in handle_node
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 608, in parse
    points = self.read_polygon()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 503, in read_polygon
    x, y = self.read_point()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 486, in read_point
    x = self.read_number()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 480, in read_number
    return int(self.read_code())
ValueError: invalid literal for int() with base 10: '274.67'

  • When I run the command below, $ rostopic echo /server_name/smach/container_status I receive msg like this.

header: seq: 5 stamp: secs: 1401776891 nsecs: 761457920 frame_id: '' path: /SM_ROOT initial_states: ['SPAWN'] active_states: ['None'] local_data: � }q. info: HEARTBEAT

Many thanks,

Originally posted by hashi on ROS Answers with karma: 226 on 2014-06-03

Post score: 7

Original comments

Comment by Andreas T. on 2014-06-30:
Hey have you solve this problem? I have the same on Ubuntu 14.04. with Indigo.


1 Answer 1


Rosanswers logo


Even though I still get an "TypeError: String or Unicode type required",a graph appeared on Smart a Viewer

when I rewrote the 480th row of the /opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py

return int(self.read_code()) -> return int(float(self.read_code()))

Originally posted by hashi with karma: 226 on 2014-06-30

This answer was ACCEPTED on the original site

Post score: 14

Original comments

Comment by Andreas T. on 2014-07-07:
Thanks it works.

Comment by hsu on 2014-07-31:
thanks, is this a valid bug in smach?

Comment by hashi on 2014-08-03:
Sorry, I'm not sure yet.

Comment by Mehdi. on 2014-08-05:
I confirm this solves the problem for me using Indigo under Ubuntu 14.04

Comment by noe.eon on 2014-09-18:
This fixed the problem, but unmasked another. I now consistently get "segmentation faults" when attempting to run the smach_viewer. Anybody run into this problem? Or suggest where I should post this question?

ROS: Indigo OS: Ubuntu 14.04 python-wx: 2.8

Comment by Wedontplay on 2014-11-06:
I got sporadic segfault errors too but I had it also before when the states weren't visualized. @hashi I signaled your solution here: link text


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.