[Pythonmac-SIG] Wierd Error/Bug in MacPython 2.0
Jack Jansen
jack@oratrix.nl
Fri, 08 Jun 2001 00:04:11 +0200
Recently, Chris Barker <chrishbarker@home.net> said:
> I'm running MacPython 2.0 (#71, Oct 22 2000 ...) on OS-9.1
>
> I have a script that loops through a very large number of large files
> (6.1 MB each), opens each one, reads it, does some NumPy crunching to
> it, closes it, does some other stuff, and then goes to the next file. It
> does this on batches of 500 files, and all that is in a loop so that it
> processes many batches. I'd love it if it could do ten or so batches.
>
> It works fine for a while, and then it dies with a :
>
> IOError: [Errno 1] Operation not permitted
>
> on the file.close() line.
This look somewhat similar (but only somewhat) to a bug I occasionally
see, but that has so far been too elusive to track down. If I copy
really large numbers of files (for instance when I run the MkDistr
script to create a distribution tree for MacPython) once in a while a
copy will fail for no apparent reason. I think that what I get is an
IOError: [Error 0] on a write, but I'm not 100% sure.
I spent a couple of days trying to track down this bug, but as it is
non-reproducible this wasn't a success. I now specifically test for
this case and simply try the copy another time. This seems to mask the
bug.
This strategy may or may not work for you, but I'm also interested to
hear whether other people are seeing similar problems.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm