[mod_python] Bug with document root.

Wouter van Marle wouter at squirrel-systems.com
Sun Mar 12 09:44:20 EST 2006


Hi all,

I think I ran into a bug of mod_python, regarding sessions. If I define
my site (and document root) in the Vhosts section, I get the below
error. If it is defined in the main configuration of apache (single
site) then there is no problem. Very strange, as the Vhosts idea used to
work (well... that is... Apache recognises and uses only the first
definition, so not all goes that great). Running Mandrake 10.1.

Wouter.


Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line
136, in handler
    result = util.apply_fs_data(object, req.form, req=req)

  File "/usr/lib/python2.3/site-packages/mod_python/util.py", line 361,
in apply_fs_data
    return object(**args)

  File "/var/www/html/jaimys/python/main.py", line 38, in home
    req.session = util.getSession(req)

  File "/var/www/html/jaimys/python/util.py", line 80, in getSession
    sess = Session.Session(req)

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
389, in Session
    timeout=timeout, lock=lock)

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
294, in __init__
    timeout=timeout, lock=lock)

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
132, in __init__
    Cookie.add_cookie(self._req, self.make_cookie())

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
160, in make_cookie
    c.path = dirpath[len(docroot):]

TypeError: unsubscriptable objectMod_python error: "PythonHandler
mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line
136, in handler
    result = util.apply_fs_data(object, req.form, req=req)

  File "/usr/lib/python2.3/site-packages/mod_python/util.py", line 361,
in apply_fs_data
    return object(**args)

  File "/var/www/html/jaimys/python/main.py", line 38, in home
    req.session = util.getSession(req)

  File "/var/www/html/jaimys/python/util.py", line 80, in getSession
    sess = Session.Session(req)

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
389, in Session
    timeout=timeout, lock=lock)

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
294, in __init__
    timeout=timeout, lock=lock)

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
132, in __init__
    Cookie.add_cookie(self._req, self.make_cookie())

  File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line
160, in make_cookie
    c.path = dirpath[len(docroot):]

TypeError: unsubscriptable object
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060312/da848dd3/attachment.html


More information about the Mod_python mailing list