ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
752 stars 911 forks source link

rospy Melodic: Use of nonexisting symbol! (Bad backport from Noetic) #2271

Open peci1 opened 2 years ago

peci1 commented 2 years ago

This got into the melodic-devel branch https://github.com/ros/ros_comm/blame/melodic-devel/clients/rospy/src/rospy/impl/tcpros_base.py#L157

_Originally posted by @v-lopez in https://github.com/ros/ros_comm/issues/1908#issuecomment-965042784_

I second @v-lopez's good eye and support it with a real-life stack trace:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 164, in run
    except ConnectionAbortedError:
NameError: global name 'ConnectionAbortedError' is not defined

This needs to be fixed ASAP. I don't know how did the change get into Melodic, but it is (should?) basically be thrown every time there is a socket error other than timeout. It's weird, because it should be around since rospy 1.14.5 (March 2020), so I guess it should have hit a lot more people...

I think the proper fix for Python 2 would be to just remove the except clause. Do the maintainers agree?