Skip to content

bag_add_time_offset fails to run #25

@J-Rojas

Description

@J-Rojas

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.

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