[Zope] sessions and zope2.6.0

Chris McDonough chrism@zope.com
21 Oct 2002 22:01:42 -0400


Did you upgrade from a prior Zope version?  If so, did you run "python
wo_pcgi" to recompile all binary modules?  There were BTrees bugs that
were fixed with 2.6.  (Crosses fingers ;-)

On Mon, 2002-10-21 at 21:33, Bakhtiar A Hamid wrote:
> hi all
> i have this "key error" with sessions, that really shows itself with zope2.6.0
> 
> previously, with 2.5.1, and 2.6.0b1, i got key error only when i tried 
> iterating thru the Trancient Object (temp_folder/session_data)
> 
> now, with 2.6.0, it seems i get this error even when setting/reading sessions.  
> this, however does not mean that this happens everytime.  it's a bit 
> unpredictable.  last time, i can still reset the Transient Object.  nowi  
> have to reset zope since i cannot get to the 
> temp_folder/session_data/manage_workspace
> 
> the relevant traceback is attached[1].  the relevant script (python)[2]
> 
> tb[1]
> Traceback (innermost last):
>   Module OFS.SimpleItem, line 201, in raise_standardErrorMessage
>   Module OFS.DTMLMethod, line 126, in __call__
>   Module DocumentTemplate.DT_String, line 474, in __call__
>   Module OFS.DTMLMethod, line 119, in __call__
>   Module DocumentTemplate.DT_String, line 474, in __call__
>   Module DocumentTemplate.DT_Util, line 201, in eval
>    - __traceback_info__: sc_def_session_val
>   Module <string>, line 2, in f
>   Module Shared.DC.Scripts.Bindings, line 252, in __call__
>   Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
>   Module Products.PythonScripts.PythonScript, line 315, in _exec
>   Module Script (Python), line 1, in sc_def_session_val
>    - <PythonScript at /kk/sc_def_session_val used for /kk/kk>
>    - Line 1
>   Module ZPublisher.HTTPRequest, line 1189, in __getattr__
>   Module ZPublisher.HTTPRequest, line 1149, in get
>   Module Products.Sessions.SessionDataManager, line 93, in getSessionData
>   Module Products.Sessions.SessionDataManager, line 180, in 
> _getSessionDataObject
>   Module Products.Transience.Transience, line 175, in new_or_existing
>   Module Products.Transience.Transience, line 786, in get
>   Module Products.Transience.Transience, line 599, in _getCurrentBucket
>   Module Products.Transience.Transience, line 688, in _housekeep
> KeyError: 1035186480
> ------
> 
> [2]
> session = context.REQUEST.SESSION
> r=context.REQUEST
> s_obj = session.get('username',None)
> 
> if s_obj is None:
>   session.set('username',_.SecurityGetUser().getUserName())
> 
> -- 
> 
> 	http://www.kedai.com.my/             http://www.kedai.com.my/eZine
> 	http://www.zope.org/Members/kedai    http://www.my-zope.org
> 	If you SMELLLL... 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )