IOError 11 CGI module

Discussion in 'Python' started by Anton Jansen, Apr 15, 2005.

  1. Anton Jansen

    Anton Jansen Guest

    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.makeform()
    File "/wing6/home/jury/iudex/nederlands/lib/iudex_cgi.py", line 24,
    in makeform
    form = _extractflat( cgi.FieldStorage() )
    File "/usr/lib/python2.3/cgi.py", line 517, in __init__
    self.read_urlencoded()
    File "/usr/lib/python2.3/cgi.py", line 622, in read_urlencoded
    qs = self.fp.read(self.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.FieldStorage() )

    ---


    With kind regards,

    Anton Jansen
     
    Anton Jansen, Apr 15, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Cobban

    Xerces parse aborted on IOError

    Jim Cobban, Dec 5, 2003, in forum: XML
    Replies:
    0
    Views:
    399
    Jim Cobban
    Dec 5, 2003
  2. Bart Nessux

    urllib IOError Exception

    Bart Nessux, Jun 11, 2004, in forum: Python
    Replies:
    4
    Views:
    1,539
    John J. Lee
    Jun 14, 2004
  3. Jay Donnell

    IOError: [Errno 32] Broken pipe

    Jay Donnell, Jun 28, 2004, in forum: Python
    Replies:
    2
    Views:
    8,399
    Donn Cave
    Jun 29, 2004
  4. fatted
    Replies:
    1
    Views:
    140
    Steve Grazzini
    Jul 25, 2003
  5. shumsta
    Replies:
    1
    Views:
    271
    Fabian Pilkowski
    Jul 22, 2005
Loading...

Share This Page