[Zope] Session Variable Error

Asad Habib ahabib at engin.umich.edu
Thu Apr 28 13:44:32 EDT 2005


I have a session variable called 'undergraduateProjectsDirected' that I
declare using the following syntax:

<dtml-call "REQUEST.SESSION.set('undergradProjectsDirected', [ ])">

When I try to append items to this list variable, I get the following
error:

AttributeError: 'NoneType' object has no attribute 'append'

I know for a fact that this variable exists since flushing the SESSION
attribute of the REQUEST variable using <dtml-var "REQUEST.SESSION">
yields its name and shows that it is initially empty.

I am using the following statement to append items:

<dtml-call "(REQUEST.SESSION.get('undergraduateProjectsDirected')).append([student_name, description])">

The strange thing is that when I change the name of this variable to
'undergradProjectsDirected', the error does not occur anymore.

Has anyone experienced something similar? I think a variable with the same
name exists (perhaps I created one in another one of my intranet
applications) and Zope is referring to the old copy instead of the newly
created one. I tried flushing the transient object container as well but
it did not make a difference.

Any help would be greatly appreciated. Thank you.

- Asad


More information about the Zope mailing list