[SciPy-User] Problem with loading large MAT files

Mohammad Abdollahi m.abdollahi at gmail.com
Mon Feb 21 13:25:47 EST 2011


Hi Matthew

Thanks for the reply. I uploaded the file right now, here's the link :
http://www.easy-share.com/1913938952/coch_six.mat

Well, I think its a 32-bit EPD but I'm not 100% sure.

Best
Mohammad



On Mon, Feb 21, 2011 at 6:57 PM, Matthew Brett <matthew.brett at gmail.com>wrote:

> Hi,
>
> > I have a couple of MAT files around 450 MB of size that apparently they
> are
> > too large for scipy.io.loadmat function. In deed I keep getting this
> error :
> >
> >  File
> >
> "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/scipy/io/matlab/mio.py",
> > line 140, in loadmat
> >    matfile_dict = MR.get_variables()
> >  File
> >
> "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/scipy/io/matlab/mio5.py",
> > line 404, in get_variables
> >    hdr, next_position = self.read_var_header()
> >  File
> >
> "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/scipy/io/matlab/mio5.py",
> > line 356, in read_var_header
> >    stream = StringIO(dcor.decompress(data))
> > SystemError: Objects/stringobject.c:4271: bad argument to internal
> function
> >
> >
> > but everything is fine when I use a file with a size around 360 MB or
> sth.
> > So does anybody know how to fix this ? of course without having to
> subdivide
> > the original MAT file into samller parts.
>
> Oh - sorry - that sounds annoying.  Can you put up the larger file
> somewhere where I can get it?   I see you are on a Mac, and it looks
> like you are using an EPD.   Have you got the 32-bit version or the
> 64?
>
> Best,
>
> Matthew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110221/a63ff424/attachment.html>


More information about the SciPy-User mailing list