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 0 1240 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ruben |
last post by:
I am reading a large text file a chunk at a time using the
readlines(buffer_size) statement. I get an IOERROR ERRNO 32 Broken
Pipe command when I "pipe" the output to MYSQL database using the
following command:
python script.py | mysql
I am using RED HAT 9 Linux. The problem only happens if I use the pipe
to MYSQL. It breaks but it gets to process around 1000 MYSQL
statements.
|
by: Nigel King |
last post by:
I have a problem with the logging module.
It reports a Broken Pipe error after outputing to the log file
occasionally (5%). This does not appear to happen on Mac OSX using
current finked python (2.3.3) but does appear to occur on Python 2.3.4
running on a very old Redhat Linux xxxxx 2.2.14-5.0 #1 Tue Mar 7
21:07:39 EST 2000 i686. The actual logged error follows my signature.
Note that "files used:-" has been sent to the file.
From a...
|
by: nicogrubert |
last post by:
Hi there
I am trying to read the content of a really large text file (1GByte) and I get
the following exception if I try to call readlines() on the opened textfile:
IOError: Cannot allocate memory
This is my code:
INFILE="/home/myuser/myfile"
|
by: Bob Swerdlow |
last post by:
We have some users of our application getting error messages like:
IOError: zipimport: can not open file
/Volumes/MyApp/MyApp.app/Contents/Resources/Modules.zip
This only happens on our Mac version - the Windows version seems fine.
Our build is still using bundlebuilder, which creates Modules.zip. I want
to upgrade to py2app, but have not yet done so (we are using py2exe for the
Windows version).
Only a few (7) of our users have had...
|
by: Gabriel Genellina |
last post by:
Hi
I'm using Python 2.4.2 on Windows 98 SE.
In a program with several threads, sometimes (I cant determine exactly
when or why) one thread dies with the following traceback:
12/13/05 02:17:47 (WatchDog ) Unhandled thread exception
Traceback (most recent call last):
File "E:\prog\pop3\TaskScheduler.py", line 60, in run
| |
by: h112211 |
last post by:
Hi,
I installed the newest available PIL (1.1.5 for Python 2.4) from their
site, but cannot seem to open any files. The following
from PIL import Image
i = Image.open(file('c:\\image2.png'))
results in
|
by: jkn |
last post by:
Hi all
Python 2.4.2 (#1, Apr 26 2006, 23:35:31)
on
linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "<stdin>", line 1, in ?
IOError: invalid mode: a
|
by: Marco |
last post by:
Hello,every one, I meet a question:
in my old script, I usually use os.popen2() to get info from standard
unix(LinuX) program like ps,ifconfig...
Now, I write a OO-based programme, I still use os.popen2( check
whether mplayer still working via ps command ), but some things I got
the following message:
Traceback (most recent call last):
|
by: Tim Couper |
last post by:
As you know, when an IOError is raised, you get a helpful:
<useful descriptor of the error>
Is there a list of all possible values of N which can be returned, and
their meanings?
--
Dr Tim Couper
CTO, SciVisum Ltd
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |