-
Notifications
You must be signed in to change notification settings - Fork 914
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
Fix rosbag API for Python 3 #1048
Conversation
Please provide a reproducible example which failed before / works with the patch. |
crashes with
Or just run the test suite with Python 3. |
Currently some of the test are failing. I will try to rerun them (in case they are flaky). @ros-pull-request-builder retest this please If that doesn't resolve them please look into why they started to fail. |
Hmm, they didn't fail locally, but I only tested against Kinetic
admittedly. I'm not sure how easy it is for me to test against anything
else.
…-- Nicu Știurcă (sent from my phone)
On May 8, 2017 1:50 PM, "Dirk Thomas" ***@***.***> wrote:
Currently some of the test are failing. I will try to rerun them (in case
they are flaky). @ros-pull-request-builder
<https://github.com/ros-pull-request-builder> retest this please
If that doesn't resolve them please look into why they started to fail.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1048 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABhfE58A0G8iTqD_muiBps3pFvl5nQH5ks5r32P0gaJpZM4NUHYZ>
.
|
This patch only addresses reading bag files. The test code first creates a bag file, and I found today that there might be some Python 3 related issues there as well. I will update on this as I can. Although I presume the failed tests above were run using Python 2, so I'm still not sure about that. |
Yes, the CI builds only use Python 2. |
tools/rosbag/src/rosbag/bag.py
Outdated
@@ -1580,6 +1580,7 @@ def _read_uint32(f): return _unpack_uint32(f.read(4)) | |||
def _read_uint64(f): return _unpack_uint64(f.read(8)) | |||
def _read_time (f): return _unpack_time (f.read(8)) | |||
|
|||
def _unpack_str(v): return v.decode() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name doesn't make much sense in the case of Python 3. Since you invoke decode
on v
it can't be a str
but must be bytes
?
Fix rosbag API for Python 3
So it looks like the build is still failing, but if I'm reading the logs right it's an issue with rosdep having timed out during the build rather than anything to do with this patch. Is there a way to re-run the build? |
Closes #1047.
It would be great to get this backported to Kinetic as well.