[SciPy-User] scipy.io.loadmat error for large MAT file on network drive

Tim Williams tjandacw@yahoo....
Tue Sep 11 09:16:41 CDT 2012


I'm getting an error trying to read a large (100MB) MAT file using 
scipy.io.loadmat (version 0.10.0b2, Python 2.7). Here is the message I get:

>>> os.getcwd()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python27\Lib\site-packages\scipy\io\matlab\mio.py", line 175, in 
    matfile_dict = MR.get_variables(variable_names)
  File "C:\Python27\Lib\site-packages\scipy\io\matlab\mio5.py", line 292, 
in get_variables
    res = self.read_var_array(hdr, process)
  File "C:\Python27\Lib\site-packages\scipy\io\matlab\mio5.py", line 255, 
in read_var_array
    return self._matrix_reader.array_from_header(header, process)
  File "mio5_utils.pyx", line 624, in 
  File "mio5_utils.pyx", line 671, in 
  File "mio5_utils.pyx", line 900, in 
  File "mio5_utils.pyx", line 622, in 
  File "mio5_utils.pyx", line 653, in 
  File "mio5_utils.pyx", line 706, in 
  File "mio5_utils.pyx", line 424, in 
  File "mio5_utils.pyx", line 360, in 
  File "streams.pyx", line 119, in 
IOError: could not read bytes

I thought it was a problem with just the file being on a mounted windows 
share drive, because when I copy over to a local drive, I can read the file 
fine, I then found a thread on this list about problems reading large MAT 
files, so I went inside of MatLab and deleted the one of the structure 
members that had the majority of the file's size. I could then read the 
smaller file with loadmat, so it seems to be a combination of the file 
being large, and being on a network.

For now, I can copy all the files I need to process to a local drive, but 
I'd like to be able to access these files from where they are.

Thanks for any help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120911/e12cbdf0/attachment.html 

More information about the SciPy-User mailing list