[Zope] Unexpected behavior with zope.session 3.9.5

Chris Austin caustin at zeomega.com
Wed Apr 11 11:55:41 UTC 2012

Hi List,

I'm running into an bit of a problem implementing zope.session on Zope2-2.12.10.
When running the following code inside a class that inherits from BrowserView:

session = ISession(self.request)[product_id]

I get the following error.

AttributeError: ZServerHTTPResponse instance has no attribute 'getCookie'

Looking through the zope.session code, the Session object adapts IRequest.   The exception is being thrown in zope.session.http.CookieClientIdManager in the the getRequestId() method with the following code.

def getRequestId(self, request):
	response_cookie = request.response.getCookie(self.namespace)

I am not sure where to begin tracking this down.   Could this be an error with utility lookup?

More information about the Zope mailing list