Skip to content

Commit

Permalink
handle sparse matrix key error
Browse files Browse the repository at this point in the history
  • Loading branch information
skjerns committed Dec 3, 2022
1 parent f0d9e79 commit 3eab0fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mat73/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ def unpack_mat(self, hdf5, depth=0, MATLAB_class=None):
' the interface has been deprecated. Please'
' raise this error as an issue on GitHub:'
' https://github.com/skjerns/mat7.3/issues')
except KeyError as e:
logging.error(f'Tried loading the sparse matrix `{elem.name}`'
' but something went wrong: {e}\n{e.__traceback__}')
raise e


elif MATLAB_class=='struct' and len(elem)>1 and \
Expand Down

0 comments on commit 3eab0fa

Please sign in to comment.