[Numpy-discussion] AttributeError: 'str' object has no attribute 'seek'

Nils Wagner nwagner@iam.uni-stuttgart...
Mon Mar 2 06:46:37 CST 2009


Hi all,

I encountered a problem wrt loadtxt.

Traceback (most recent call last):
   File "mac.py", line 9, in <module>
     mac = 
loadtxt('mac_diff.pmat.gz',skiprows=27,comments='!',usecols=(0,2,4),dtype='|S40')
   File 
"/data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/io.py", 
line 384, in loadtxt
     fh = seek_gzip_factory(fname)
   File 
"/data/home/nwagner/local/lib/python2.5/site-packages/numpy/lib/io.py", 
line 51, in seek_gzip_factory
     f.seek = new.instancemethod(seek, f)
AttributeError: 'str' object has no attribute 'seek'

>>> numpy.__version__
'1.3.0.dev6520'

Nils


More information about the Numpy-discussion mailing list