mod_python + publisher + psp + session problems

E

exhuma.twn

Hi again,

as soon as I try to make use of the "session" object inside a
psp-template file, I get the following error:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

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

File "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line
143, in handler
result = str(result)

File "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 228,
in __str__
self.run()

File "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 191,
in run
session = Session.Session(req)

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

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

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

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

TypeError: unsubscriptable object

Any ideas?
 
G

grahamd

exhuma.twn said:
Hi again,

as soon as I try to make use of the "session" object inside a
psp-template file, I get the following error:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

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

File "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line
143, in handler
result = str(result)

File "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 228,
in __str__
self.run()

File "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 191,
in run
session = Session.Session(req)

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

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

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

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

TypeError: unsubscriptable object

Any ideas?

Upgrade to mod_python 3.2.8 and your problem will go away.

See:

http://issues.apache.org/jira/browse/MODPYTHON-50

I suggest that in future you use the mod_python mailing list for
questions
as that is where most knowledgeable people on mod_python hang out.

Graham
 
E

exhuma.twn

exhuma.twn said:
Hi again,

as soon as I try to make use of the "session" object inside a
psp-template file, I get the following error:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

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

File "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line
143, in handler
result = str(result)

File "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 228,
in __str__
self.run()

File "/usr/lib/python2.4/site-packages/mod_python/psp.py", line 191,
in run
session = Session.Session(req)

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

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

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

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

TypeError: unsubscriptable object

Any ideas?

Upgrade to mod_python 3.2.8 and your problem will go away.

See:

http://issues.apache.org/jira/browse/MODPYTHON-50

I suggest that in future you use the mod_python mailing list for
questions
as that is where most knowledgeable people on mod_python hang out.

Graham

Thanks a lot Graham. This solved the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top