struct.error: unpack_from requires a buffer of at least 124 bytes for unpacking 4 bytes at offset 120
Closed this issue · 2 comments
bastianhjaeger commented
Installed kappe
with pip install kappe
on ubuntu22.04 LTE
Config.yaml:
topic:
remove:
- event
running it gives me:
$ kappe convert --config config.yaml ./00004-2024-01-25_10-57-27.mcap out
WARNING | kappe.cli | msg_folder does not exist: msgs
INFO | kappe.cli | Using 16 threads
0%| | 0/1 [00:00<?, ?it/s]INFO | kappe.cli | Writing out/00004-2024-01-25_10-57-27.mcap
INFO | kappe.convert | Topics: 83, filtered topics: 81
00004-2024-01-25_10-57-27.mcap: 0%| | 0.00/14.23 [00:00<?, ?secs/s]
ERROR | kappe.cli | Failed to convert 00004-2024-01-25_10-57-27.mcap
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/kappe/cli.py", line 46, in convert_worker
conv.process_file(tqdm_idx)
File "/home/user/.local/lib/python3.10/site-packages/kappe/convert.py", line 451, in process_file
for msg in msg_iter:
File "/home/user/.local/lib/python3.10/site-packages/mcap/reader.py", line 193, in iter_decoded_messages
schema, channel, message, decoded_message(schema, channel, message)
File "/home/user/.local/lib/python3.10/site-packages/mcap/reader.py", line 184, in decoded_message
return decoder(message.data)
File "/home/user/.local/lib/python3.10/site-packages/mcap_ros2/_dynamic.py", line 239, in <lambda>
return lambda data: read_message(schema_name, msgdefs, data)
File "/home/user/.local/lib/python3.10/site-packages/mcap_ros2/_dynamic.py", line 212, in read_message
return _read_complex_type(msgdef, msgdefs, reader)
File "/home/user/.local/lib/python3.10/site-packages/mcap_ros2/_dynamic.py", line 324, in _read_complex_type
value = array_parser_fn(reader, array_length)
File "/home/user/.local/lib/python3.10/site-packages/mcap_ros2/_cdr.py", line 221, in float32_array
return [self.float32() for _ in range(length)]
File "/home/user/.local/lib/python3.10/site-packages/mcap_ros2/_cdr.py", line 221, in <listcomp>
return [self.float32() for _ in range(length)]
File "/home/user/.local/lib/python3.10/site-packages/mcap_ros2/_cdr.py", line 149, in float32
return self._unpack(
File "/home/user/.local/lib/python3.10/site-packages/mcap_ros2/_cdr.py", line 256, in _unpack
value = fn(self.data, self.offset)[0]
struct.error: unpack_from requires a buffer of at least 124 bytes for unpacking 4 bytes at offset 120 (actual buffer size is 120)
INFO | kappe.cli | Done out/00004-2024-01-25_10-57-27.mcap
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
mrkbac commented
Hi there.
From your logs it looks like your mcap contains corrupt ROS data. Can you check if the problems persist with other mcaps or provide a file to reproduce on my machine?
github-actions commented
Issue marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.