467,892 Members | 1,894 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,892 developers. It's quick & easy.

mod_python + publisher + psp + session problems

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?

Mar 20 '06 #1
  • viewed: 2937
Share:
2 Replies

exhuma.twn wrote:
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

Mar 20 '06 #2

gr*****@dscpl.com.au wrote:
exhuma.twn wrote:
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.

Mar 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by John Dean | last post: by
1 post views Thread by charlie knudsen | last post: by
reply views Thread by Julien Cigar | last post: by
reply views Thread by Python_it | last post: by
6 posts views Thread by Little | last post: by
10 posts views Thread by walterbyrd | last post: by
2 posts views Thread by m.banaouas | last post: by
1 post views Thread by jpuopolo | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.