gbionics / gbionics/robot-log-visualizer

Print clear error if a user is tryng to load a .mat file version < 7.3

Open
#84 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
32
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Probably we can check if the .mat file is supported by looking at the starting bytes of the file, see:

~~~
def is_hdf5(file_path):
with open(file_path, 'rb') as f:
signature = f.read(8)
return signature == b'\x89HDF\r\n\x1a\n'
~~~

Based on https://docs.hdfgroup.org/hdf5/v1_14/_f_m_t3.html#Superblock, it seems that this indeed a way to quickly check if a given file is hdf5 .

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the code path that loads .mat files and inspect how unsupported file versions currently fail. Use the HDF5 signature check described in the issue to distinguish supported files, then verify that older versions produce a clear error instead of the existing failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.