Python Forum

Full Version: Error -3 when opening matlab file in python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using the method below to open matlab files but for some files, I am getting different versions of error -3

mat = sio.loadmat(i, verify_compressed_data_integrity=False)
Error

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.array_from_header()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.array_from_header()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_real_complex()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_numeric()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_element()

streams.pyx in scipy.io.matlab.streams.ZlibInputStream.read_string()

streams.pyx in scipy.io.matlab.streams.ZlibInputStream.read_into()

streams.pyx in scipy.io.matlab.streams.ZlibInputStream._fill_buffer()

error: Error -3 while decompressing data: invalid stored block lengths


It seems to point to an issue with Zlib. How do I solve this? thanks