[mod_python] Request parameter yields 500 Internal Server Error?

Johannes Bauer dfnsonfsduifb at gmx.de
Fri Aug 29 19:52:36 EDT 2008


Hello list,

I'm still using Apache 2.2.3 + mod_python 3.2.10 + mod_auth (as a 
workaround to the mod_digest bug, I just *really* want to avoid having 
to recompile mod_python). Playing around I'd now like to access POST 
variables passed to a document. Currently, I had my index function 
defined as

def index():

which I changed to

def index(request):

Now I'm getting:

[Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler 
mod_python.publisher: Traceback (most recent call last):, referer: 
https://myhostname.mydomain.com/network/doc_hostlist.py
[Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler 
mod_python.publisher:   File 
"/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in 
HandlerDispatch\n    result
  = object(req), referer: 
https://myhostname.mydomain.com/network/doc_hostlist.py
[Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler 
mod_python.publisher:   File 
"/usr/lib/python2.4/site-packages/mod_python/publisher.py", line 213, in 
handler\n    published =
  publish_object(req, object), referer: 
https://myhostname.mydomain.com/network/doc_hostlist.py
[Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler 
mod_python.publisher:   File 
"/usr/lib/python2.4/site-packages/mod_python/publisher.py", line 412, in 
publish_object\n    retu
rn publish_object(req,util.apply_fs_data(object, req.form, req=req)), 
referer: https://myhostname.mydomain.com/network/doc_hostlist.py
[Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler 
mod_python.publisher:   File 
"/usr/lib/python2.4/site-packages/mod_python/util.py", line 439, in 
apply_fs_data\n    return obj
ect(**args), referer: 
https://myhostname.mydomain.com/network/doc_hostlist.py
[Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler 
mod_python.publisher: TypeError: index() takes exactly 1 argument (0 
given), referer: https://myhostname.mydomain.com/network/d
oc_hostlist.py

Am I doing somethign wrong?

Regards,
Johannes


More information about the Mod_python mailing list