2010/3/31 benhoyt <[email protected]>:
> Hi guys,
>
> I've got a little web.py app (psycopg2 for db, Cheetah for templates,
> built-in CherryPy server) that's throwing an exception every *second*
> request while writing the SQL output to stderr during _db_execute().
> I'm getting an IOError with errno 9, which is "Bad file descriptor"
> every second request, and every other request it all works fine.
>
> It's throwing the exception on the "out.write(x)" line of
> _debugwrite() in webapi.py, and the traceback shows that out is
>
>    <open file '<stderr>', mode 'w' at 0x0000000000FCC140>
>
> and x is a fairly long string (about 1800 bytes) beginning with
>
>    0.05 (1): CREATE TEMP TABLE ...
>
> So it seems something is messing up sys.stderr somehow, but I have no
> idea who or how (I'm not altering stderr). I suspect some multi-
> threading issue, because the CherryPy server does start up 10 threads.
>
> I'm using Python 2.6 on an x86_64 machine running Windows Vista.
>
> Anyone have any ideas? Has anyone seen anything similar before?

Try adding web.config.debug = False. That will disable printing
queries to web.debug.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to