rosbag 'UnicodeDecodeError'
I have some rosbags. Most of them seem to be okay according to 'rosbag check <file>'. But a few of them cause the check to be aborted in the middle of the bag with the error below.
What is the best way to avoid this decoding error?
Traceback (most recent call last):
File "/opt/ros/indigo/bin/rosbag", line 35, in <module>
rosbag.rosbagmain()
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/rosbag_main.py", line 863, in rosbagmain
cmds[cmd](argv[2:])
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/rosbag_main.py", line 452, in check_cmd
migrations = checkbag(mm, args[0])
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/migration.py", line 76, in checkbag
for topic, msg, t in bag.read_messages(raw=True):
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/bag.py", line 2331, in read_messages
yield self.seek_and_read_message_data_record((entry.chunk_pos, entry.offset), raw)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/bag.py", line 2469, in seek_and_read_message_data_record
msg_type = _get_message_type(connection_info)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosbag/bag.py", line 1565, in _get_message_type
message_type = genpy.dynamic.generate_dynamic(info.datatype, info.msg_def)[info.datatype]
File "/opt/ros/indigo/lib/python2.7/dist-packages/genpy/dynamic.py", line 168, in generate_dynamic
tmp_file.file.write(full_text.encode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2788: ordinal not in range(128)
Please sign the answer as correct if it was helpful.