[Zope] AttributeError on SESSION

Dieter Maurer dieter at handshake.de
Thu Mar 16 14:10:43 EST 2006


Peter Bengtsson wrote at 2006-3-15 22:02 +0000:
> ...
>What do you get AttributeError on actually? What line?
>The code above looks just fine. Are you perhaps trying to do session 
>['last view'] somewhere else without checking that it first exists?

The reported problem looks as if the REQUEST were used
after it has been closed.

This can for example happen when an acquisition wrapper
is cached in a "_v_" variable. The wrapper has at its
bottom a stale REQUEST object, now closed.
A closed REQUEST has lost all content of its "other", among them
"SESSION".

-- 
Dieter


More information about the Zope mailing list