Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > IOError 11 CGI module

Reply
Thread Tools

IOError 11 CGI module

 
 
Anton Jansen
Guest
Posts: n/a
 
      04-15-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
perl/cgi exploit with bracketed module names passed in as CGI param shumsta Perl Misc 1 07-21-2005 11:30 PM
IOError: [Errno 32] Broken pipe Jay Donnell Python 2 06-29-2004 12:13 AM
urllib IOError Exception Bart Nessux Python 4 06-14-2004 12:02 AM
Xerces parse aborted on IOError Jim Cobban XML 0 12-05-2003 03:26 PM
CGI module: getting cgi params from text file redirected to script run on the commandline fatted Perl Misc 1 07-25-2003 01:44 AM



Advertisments