Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.
This repository was archived by the owner on May 31, 2025. It is now read-only.

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

@peci1

Description

@peci1

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 #1908 (comment)

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions