IOError 11 CGI module

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anton Jansen

    #1

    IOError 11 CGI module

    Hi list,

    I have troubles with some python scripts I use as cgi scripts with
    thttpd. At irregular intervals when a post is made an IOError is raised
    by the CGI module. My question is how and why does this happen?


    The exception looks like this:

    ---
    Traceback (most recent call last):
    File "teamadmin.cgi" , line 11, in ?
    iudex_cgi.makef orm()
    File "/wing6/home/jury/iudex/nederlands/lib/iudex_cgi.py", line 24,
    in makeform
    form = _extractflat( cgi.FieldStorag e() )
    File "/usr/lib/python2.3/cgi.py", line 517, in __init__
    self.read_urlen coded()
    File "/usr/lib/python2.3/cgi.py", line 622, in read_urlencoded
    qs = self.fp.read(se lf.length)
    IOError: [Errno 11] Resource temporarily unavailable
    ---

    The code:

    File:iudex_cgi. py
    ---

    import sys
    import time
    import traceback
    import cgi
    import MySQLdb
    from iudex_tags import *

    form = None

    def _extractflat( fields ):
    form = {}
    for i in fields.value:
    if not form.has_key( i.name ):
    form[i.name] = []
    if i.filename:
    form[i.name].append( ( i.filename, i.value ) )
    else:
    form[i.name].append( i.value )
    return form

    def makeform():
    global form
    form = _extractflat( cgi.FieldStorag e() )

    ---


    With kind regards,

    Anton Jansen
Working...