[Zope-dev] CoreSessionTracking

Chris McDonough chrism@digicool.com
Mon, 23 Apr 2001 10:46:18 -0400


Darn.  Security nails us once again.  :-(

I'll need to figure out how to allow __setitem__ to be called on session
data objects from within a Python Script.

In the meantime, use the .set method of the session data object, e.g. in the
onStart function:

sdo.set('Username', 'Foobar')

.. or use an external method.

----- Original Message -----
From: "Magnus Heino (Rivermen)" <magnus.heino@rivermen.se>
To: "'Chris McDonough'" <chrism@digicool.com>
Cc: <zope-dev@zope.org>
Sent: Monday, April 23, 2001 10:37 AM
Subject: SV: [Zope-dev] CoreSessionTracking


> This onStart method...
>
> sdo['date'] = context.ZopeTime()
>
> ...gives this error:
>
> ------
> 2001-04-23T14:36:32 PROBLEM(100) Session Tracking session event failed
> The call to function onStart failed.  Traceback:
> Traceback (innermost last):
>   File
>
/usr/home/magnus/www/Zope-2.3.1-src/lib/python/Products/CoreSessionTracking/
> SessionDataManager.py, line 451, in __call__
>     (Object: )
>   File
>
/usr/home/magnus/www/Zope-2.3.1-src/lib/python/Shared/DC/Scripts/Bindings.py
> , line 324, in __call__
>     (Object: onStart)
>   File
>
/usr/home/magnus/www/Zope-2.3.1-src/lib/python/Shared/DC/Scripts/Bindings.py
> , line 354, in _bindAndExec
>     (Object: onStart)
>   File
>
/usr/home/magnus/www/Zope-2.3.1-src/lib/python/Products/PythonScripts/Python
> Script.py, line 336, in
> _exec
>     (Object: onStart)
>     (Info: ({'script': <PythonScript instance at 87d1b10>, 'context':
> <Folder instance at 8847358>, 'container': <Folder instance at 8847358>,
> 'traverse_subpath': []}, ({},), {}, None))
>   File Script (Python), line 2, in onStart
>   File
>
/usr/home/magnus/www/Zope-2.3.1-src/lib/python/Products/PythonScripts/zbytec
> odehacks/VSExec.py, line 430, in __setitem__
> TypeError: object does not support item assignment
>