rosbag cannot convert bag.active file to .bag

asked 2022-11-23 04:15:34 -0500

huytd gravatar image

I try to convert from bag.active to .bag file but get error, I use ros noetic and ubuntu 20.04. but got error.

rosbag reindex FlightLog-2022-11-23-15-17.bag.active

Traceback (most recent call last): File "/opt/ros/noetic/bin/rosbag", line 35, in <module> rosbag.rosbagmain() File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/rosbag_main.py", line 1032, in rosbagmain cmdscmd File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/rosbag_main.py", line 631, in reindex_cmd bag_op(args, True, True, lambda b: b.version > 102, op, options.output_dir, options.force, options.quiet) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/rosbag_main.py", line 674, in bag_op inbag = Bag(inbag_filename, 'r', allow_unindexed=allow_unindexed) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 467, in __init__ self._open(f, mode, allow_unindexed) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 1428, in _open if mode == 'r': self._open_read(f, allow_unindexed) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 1456, in _open_read self._version = self._read_version() File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 1564, in _read_version version_line = self._file.readline().rstrip().decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9f in position 0: invalid start byte

rosbag reindex FlightLog-2022-11-23-15-17.bag.active FlightLog-2022-11-23-15-17.bag

Traceback (most recent call last): File "/opt/ros/noetic/bin/rosbag", line 35, in <module> rosbag.rosbagmain() File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/rosbag_main.py", line 1032, in rosbagmain cmdscmd File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/rosbag_main.py", line 631, in reindex_cmd bag_op(args, True, True, lambda b: b.version > 102, op, options.output_dir, options.force, options.quiet) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/rosbag_main.py", line 674, in bag_op inbag = Bag(inbag_filename, 'r', allow_unindexed=allow_unindexed) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 467, in __init__ self._open(f, mode, allow_unindexed) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 1428, in _open if mode == 'r': self._open_read(f, allow_unindexed) File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 1456, in _open_read self._version = self._read_version() File "/opt/ros/noetic/lib/python3/dist-packages/rosbag/bag.py", line 1564, in _read_version version_line = self._file.readline().rstrip().decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9f in position 0: invalid start byte

edit retag flag offensive close merge delete