Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcpros_base.py:160: too many values to unpack #49

Closed
gavanderhoorn opened this issue Jun 12, 2021 · 2 comments · Fixed by #50
Closed

tcpros_base.py:160: too many values to unpack #49

gavanderhoorn opened this issue Jun 12, 2021 · 2 comments · Fixed by #50

Comments

@gavanderhoorn
Copy link

With a Python 3.8.5 venv and rospy installed from rospypi, termination of scripts can result in the following traceback:

Traceback (most recent call last):
  File "C:\Python38\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Python38\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\...\venv_rospypi\lib\site-packages\rospy\impl\tcpros_base.py", line 160, in run
    (e_errno, msg) = e.args
ValueError: too many values to unpack (expected 2)

On that system, e.args is actually a 3-tuple: errno, function, msg. Upstream rospy seems to handle that (from here):

except IOError as e:
    (e_errno, msg, *_) = e.args

(although I don't believe msg will actually contain the message in that case)

This was fixed in ros/ros_comm#2050 in rospy.

Is that not included in the rospy distributed by rospypi?

@otamachan
Copy link
Contributor

Thank you for your feedback!
I'll release the ros_comm(1.15.11) soon.

@otamachan otamachan reopened this Jun 13, 2021
@gavanderhoorn
Copy link
Author

Thank you for fixing this up so quickly 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants