[Numpy-discussion] Using loadtxt() twice on same file freezes python

Ryan May rmay31@gmail....
Thu Mar 26 15:29:24 CDT 2009


On Thu, Mar 26, 2009 at 3:24 PM, Sander de Kievit <
dekievit@strw.leidenuniv.nl> wrote:

> David Cournapeau wrote:
> > On Fri, Mar 27, 2009 at 1:14 AM, Sander de Kievit
> > <dekievit@strw.leidenuniv.nl> wrote:
> >> Hi,
> >>
> >> On my PC the following code freezes python:
> >>
> >> [code]
> >> import numpy as np
> >> from StringIO import StringIO
> >> c = StringIO("0 1\n2 3")
> >> np.loadtxt(c)
> >> np.loadtxt(c)
> >> [/code]
> >>
> >> Is this intentional behaviour or should I report this as a bug?
> >
> > Which version of numpy are you using (numpy.version.version), on which OS
> ?
> The specifics for my platform:
> Fedora release 10 (Cambridge)
> kernel: 2.6.27.19-170.2.35.fc10.i686 #1 SMP
> python: 2.5.2
> numpy: 1.2.0
>
> Also, if I close the file in between the two calls it works without
> problem (if I use a real file, that is).
>
> >
> > That's a most definitly not expected behavior (you should get an
> > exception the second time because the "stream" is empty - which is
> > exactly what happens on my installation, but your problem may be
> > platform specific).
> >
> > cheers,
> >
> > David
>
> Thanks for the quick replies! I'll report the bug.


Before reporting the bug, can you upgrade to 1.2.1.  I seem to remember
something about this bug and my gut tells me it got fixed in between 1.2.0
and 1.2.1.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090326/e5e5a4d2/attachment.html 


More information about the Numpy-discussion mailing list