Okay ... I figure I've probably managed to really hose up my Zope instance
somehow but I can't figure out what it would be.  Whenever I'm trying to
access the SESSION data, I get an AttributeError on SESSION.  This used to
work for me and on another Zope instance I have it does indeed work.  I
used the session test PythonScript from The Zope Book, as follows:

if session.has_key('last view'):
    # The script has been viewed before, since the 'last view'
    then=session['last view']
    session['last view']=now # reset last view to now
    return 'Seconds since last view %.2f' % ((now - then) * secs_per_day)

# The script hasn't been viewed before, since there's no 'last view' 
session['last view']=context.ZopeTime()
return 'This is your first view'

(well, I actually started with other code, but this causes the same
This works as advertised in my other instance but throws the same
AttributeError on my first instance.  I'm assuming that I managed to
delete and/or edit something important without realizing it.  I did some
web searches on this but didn't really turn up anything, pretty much
everything I found assumed that SESSION was working :)

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to