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

bag_add_time_offset fails to run #25

Open
J-Rojas opened this issue Jul 18, 2019 · 1 comment · May be fixed by #26
Open

bag_add_time_offset fails to run #25

J-Rojas opened this issue Jul 18, 2019 · 1 comment · May be fixed by #26

Comments

@J-Rojas
Copy link

J-Rojas commented Jul 18, 2019

There's some incorrect code after running the bag_add_time_offset.py file

Traceback (most recent call last):
  File "/home/jrojas/work/projects/ros_stuff/catkin_ws/src/srv_tools/bag_tools/scripts/bag_add_time_offset.py", line 78, in <module>
    fix_bagfile(args.i, args.o, arg.t, args.of)
NameError: name 'arg' is not defined

I managed to fix this, then received another error:

Traceback (most recent call last):
  File "/home/jrojas/work/projects/ros_stuff/catkin_ws/src/srv_tools/bag_tools/scripts/bag_add_time_offset.py", line 78, in <module>
    fix_bagfile(args.i, args.o, args.t, args.of)
  File "/home/jrojas/work/projects/ros_stuff/catkin_ws/src/srv_tools/bag_tools/scripts/bag_add_time_offset.py", line 56, in fix_bagfile
    for topic, msg, t in rosbag.Bag(inbag).read_messages():
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 458, in __init__
    self._open(f, mode, allow_unindexed)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 1415, in _open
    if   mode == 'r': self._open_read(f, allow_unindexed)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 1437, in _open_read
    self._file     = open(f, 'rb')
TypeError: coercing to Unicode: need string or buffer, list found

I will send a PR to fix these.

@J-Rojas J-Rojas linked a pull request Jul 18, 2019 that will close this issue
@hanliming08
Copy link

fix_bagfile(args.i, args.o, arg.t, args.of)
fix_bagfile(args.i, args.o, args.t, args.of)

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