-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using 'loadmat' with h5py 3.0 #102
Comments
Reverting to h5pi to 2.10.0 lets it work with the following warning:
|
Sorry I have taken so long to get around to this. The problem appears is a backwards incompatible change in h5py or a bug. Specifically, the problem comes up with reading the 'MATLAB_fields' Attribute which has a quite unusual type. It can be written, but it can no longer be read in any way except probably through h5py's low level API which is no longer documented. The bug shows up if one does the following to make an Attribute with the same type
The output from
I am going to bring this up with h5py and see what can be done about it, including whether there is a good work around using the low level API (the more raw libhdf5 bindings). |
See h5py/h5py#1817 |
Workarounds added in commit 3008efs for the main branch and commit a63128b for the 0.1.x branch. The package should now work for h5py 3.0 and 3.1. I will be uploading version 0.1.16 to PyPI shortly. |
Had a bug in the commits fixing the issues on 32-bit systems. Recent commits fix that. |
Just released version 0.1.17 on PyPI which includes the fix. |
I have recently upgraded to h5py 3.0.0, as i need some of the new features. As #101 also pointed out, currently hdf5storage is broken when using 3.0.0. However for me using the master branch with v2.0 does not fix it. I am adding an example here, as I am frequently loading v7.3
.mat
files from Matlab.The following code produces an
ValueError
, which is actually hidden if you supply a list of variable_names. After some debugging and reading the change list from 3.0, I still don't really understand exactly whats going wrong there. It seems to read an attribute named 'MATLAB_fields' from the file, thats where it fails.Example
Output
The text was updated successfully, but these errors were encountered: