*if you're using mode 'w' - what are the file permissions in the folder it's writing to? looks like it just can't write(*?) *----------------------- Visit My Sites! http://1-4-u.info | Don't send insanely long links! www.superantispyware.com/superantispyware.html?rid=3971 Remove All The Spyware - Not Just The Easy Ones!
On Wed, Mar 31, 2010 at 4:22 AM, benhoyt <[email protected]> wrote: > 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? > > Thanks, > Ben. > > -- > 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] <webpy%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/webpy?hl=en. > > -- 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.
