WindowsError in time.sleep !?!??!!

Thomas Heller theller at python.net
Mon Jul 1 06:04:18 EDT 2002


"Eric Brunel" <eric.brunel at pragmadev.com> wrote in message news:afp8em$r0p$1 at wanadoo.fr...
> Eric Brunel wrote:
> [snip]
> > Does anybody have an explanation and/or a workaround for this problem? We
> > may of course delete this statement, but it doesn't sound quite safe: we
> > have many time.sleep in our code, and if we don't understand why this is
> > happening, it may break another one later...
>
> We tried to delete the statement, and it actually crashes later, but on an
> even stranger line: it's an if statement, just comparing a plain variable
> to an empty string (something like "if v == '':"). And we get the same
> error: WindowsError, access denied...
>
This sounds like some C code (in an extension?)is setting
an error, and failes to check for NULL afterwards.
If you insert something like this before your "if v == '':" line
  try: 1/0
  except: pass
and the problem goes away, it seems to be the cause for it.

Thomas






More information about the Python-list mailing list