[mod_python] When trying to get cgi.FieldStorage() : AttributeError: 'sys' module has no attribute 'argv'

Alain Tésio alain at onesite.org
Sun May 20 04:45:02 EST 2001


Hi, I found a message in an archive saying I shouldn't use
FieldStorage with publisher
http://www.modpython.org/pipermail/mod_python/2001-January/001086.html
but I'm not using publisher (or I don't know I am)
Any idea what's happening ?

Thanks
Alain

=========== observer_www.py
import cgi
items=cgi.FieldStorage()

=========== output

Mod_python error: "PythonHandler observer_www"

Traceback (most recent call last):

  File "/usr/local/lib/python2.1/site-packages/mod_python/apache.py", line
176, in Dispatch
    module = import_module(module_name, _req)

  File "/usr/local/lib/python2.1/site-packages/mod_python/apache.py", line
340, in import_module
    module = imp.load_module(mname, f, p, d)

  File "/home/observer/scripts/observer_www.py", line 2, in ?
    items=cgi.FieldStorage()

  File "/usr/local/lib/python2.1/cgi.py", line 445, in __init__
    elif sys.argv[1:]:

AttributeError: 'sys' module has no attribute 'argv'





More information about the Mod_python mailing list