Open konradbender opened 1 year ago
I experience the same issue, though I am not sure it is directly related to whether the file exists or not. Any change to the file will make the error go away. For instance, this sequence will not generate an error:
hdf5storage.write({'labels':123},
path='./',filename='hep.mat',store_python_metadata = True, matlab_compatible=True)
hdf5storage.write({'labels':123,'r':2},
path='./',filename='hep.mat',store_python_metadata = True, matlab_compatible=True)
Hi there, I encountered the same issue. I am using version 0.1.19
which, at the moment of writing, is the version available via conda
.
Another workaround seems to use the option truncate_existing=True
. This will erase the existing content.
Hi there,
this is difficult to replicate as it might have to do with my specific file (which I can share, if necessary). But basically, when I do
hdf5storage.savemat
then it works on the first try, but fails on the second iteration when overwriting the file. Here is the code that would trigger this (note the local filesamples.mat
is used):Output:
I have a "workaround" right now which is just to not overwrite existing files. But would be keen to learn what might be going wrong, or find out how I can contribute to fix this bug if it is one. Let me know if I should make the local file available to you to reproduce it.
Many thanks