CoreSessionTrackung KeyError ?
Hi, I'm running Zope 2.3.3 with CoreSessionTracking 0.9. After working for hours in a Zope Session I got sometimes an KeyError. I don't know how many other users working on my zope at the same time, but this KeyError was reported from at least 1 other users. Has anybody a hint what to change ? Regards, Dirk ErrorType: KeyError ErrorText: 76225064A0dd9Ykfc-4 -------------------------------------------------------------------------------- Troubleshooting Suggestions This resource may be trying to reference a nonexistent object or variable 76225064A0dd9Ykfc-4. The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 224, in publish_module File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/share/zope/lib/python/Zope/__init__.py, line 227, in zpublisher_exception_hook (Object: ElementWithAttributes) File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/share/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/share/zope/lib/python/Products/EasyEditor/EasyEditable.py, line 372, in index_html (Object: ElementWithAttributes) File /usr/share/zope/lib/python/Products/EasyEditor/EasyTemplates/EasyViews.py, line 94, in __call__ (Object: default) File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 197, in __call__ (Object: default) File /usr/share/zope/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__ (Object: default) File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 190, in __call__ (Object: pageheader) File /usr/share/zope/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__ (Object: pageheader) File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 190, in __call__ (Object: init_session) File /usr/share/zope/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__ (Object: init_session) File /usr/share/zope/lib/python/DocumentTemplate/DT_Util.py, line 339, in eval (Object: REQUEST.set('data',sessionDM.getSessionData())) (Info: REQUEST) File <string>, line 0, in ? File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataManager.py, line 264, in getSessionData (Object: sessionDM) File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataManager.py, line 375, in _createSessionDataObject (Object: sessionDM) File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataContainer.py, line 191, in set (Object: /sessionDM) File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataContainer.py, line 344, in __setitem__ (Object: /sessionDM) KeyError: (see above)
Hi Dirk, This is a known bug in CoreSessionTracking that is fixed by the sessioning machinery in Zope 2.5 or 2.6 (it no longer requires CoreSessionTracking) - C On Wed, 2002-09-11 at 02:29, Dirk Datzert wrote:
Hi,
I'm running Zope 2.3.3 with CoreSessionTracking 0.9.
After working for hours in a Zope Session I got sometimes an KeyError. I don't know how many other users working on my zope at the same time, but this KeyError was reported from at least 1 other users.
Has anybody a hint what to change ?
Regards, Dirk
ErrorType: KeyError ErrorText: 76225064A0dd9Ykfc-4
--------------------------------------------------------------------------------
Troubleshooting Suggestions
This resource may be trying to reference a nonexistent object or variable 76225064A0dd9Ykfc-4. The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page.
If the error persists please contact the site maintainer. Thank you for your patience.
Traceback (innermost last): File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 224, in publish_module File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/share/zope/lib/python/Zope/__init__.py, line 227, in zpublisher_exception_hook (Object: ElementWithAttributes) File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/share/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/share/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/share/zope/lib/python/Products/EasyEditor/EasyEditable.py, line 372, in index_html (Object: ElementWithAttributes) File /usr/share/zope/lib/python/Products/EasyEditor/EasyTemplates/EasyViews.py, line 94, in __call__ (Object: default) File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 197, in __call__ (Object: default) File /usr/share/zope/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__ (Object: default) File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 190, in __call__ (Object: pageheader) File /usr/share/zope/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__ (Object: pageheader) File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 190, in __call__ (Object: init_session) File /usr/share/zope/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__ (Object: init_session) File /usr/share/zope/lib/python/DocumentTemplate/DT_Util.py, line 339, in eval (Object: REQUEST.set('data',sessionDM.getSessionData())) (Info: REQUEST) File <string>, line 0, in ? File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataManager.py, line 264, in getSessionData (Object: sessionDM) File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataManager.py, line 375, in _createSessionDataObject (Object: sessionDM) File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataContainer.py, line 191, in set (Object: /sessionDM) File /usr/share/zope/lib/python/Products/CoreSessionTracking/SessionDataContainer.py, line 344, in __setitem__ (Object: /sessionDM) KeyError: (see above)
Hi Chris,
Hi Dirk,
This is a known bug in CoreSessionTracking that is fixed by the sessioning machinery in Zope 2.5 or 2.6 (it no longer requires CoreSessionTracking)
nice to hear that, but that doesn't help me. I have to use Zope 2.3.3 and the available CoreSessionTracking. What was the fix for that problem ? Regards, Dirk
The fix for the problem was rewriting the session data container to work around BTrees bugs. The fix was not backported to CST. Apologies. I'd suggest either moving to 2.6 or trying to graft the 2.6 "Transience" code into CST. - C On Wed, 2002-09-11 at 09:58, Dirk Datzert wrote:
Hi Chris,
Hi Dirk,
This is a known bug in CoreSessionTracking that is fixed by the sessioning machinery in Zope 2.5 or 2.6 (it no longer requires CoreSessionTracking)
nice to hear that, but that doesn't help me.
I have to use Zope 2.3.3 and the available CoreSessionTracking.
What was the fix for that problem ?
Regards, Dirk
Hi Chris, if you can tell me where to find the Transience, I will try that. I heard from that and locked into CVS and mailing list but didn't realize a solution for my problem. Have you a CVS address to lock for ?
The fix for the problem was rewriting the session data container to work around BTrees bugs. The fix was not backported to CST. Apologies. I'd suggest either moving to 2.6 or trying to graft the 2.6 "Transience" code into CST.
Regards, Dirk
On 11/9/02 3:09 pm, "Dirk Datzert" <dirk.datzert@tks-rasselstein.thyssenkrupp.com> wrote:
Hi Chris,
if you can tell me where to find the Transience, I will try that. I heard from that and locked into CVS and mailing list but didn't realize a solution for my problem.
Have you a CVS address to lock for ?
http://cvs.zope.org/Products/Transience/ could be a good place to start. Cheers Tone. Ps the new Session stuff is quite good, if you can get away from 2.3.3 it would be *a good thing* (IMHO). -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
Thanks Tony,
http://cvs.zope.org/Products/Transience/ could be a good place to start.
In which corelation show I see Transience, TransienceInterface or TransienceObject in conjunction with CoreSessionTracking or one of the python classes of CST ? Regards, Dirk
Hi, Is it possible to use the Products Session, Transience and TemporaryFolder under Zope-2.3.3 ? Than the CoreSessionTracking could be removed and my Problem is solved ? Regards, Dirk
You can try it... it might work. ;-) On Wed, 2002-09-11 at 16:06, Dirk Datzert wrote:
Hi,
Is it possible to use the Products Session, Transience and TemporaryFolder under Zope-2.3.3 ? Than the CoreSessionTracking could be removed and my Problem is solved ?
Regards, Dirk
_______________________________________________ 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 )
Hi Chris, ok I tried it. Here my results running on Zope-2.3.3, Python 2.1.3: with Sessions, Transience and TemporaryFolder from cvs.zope.org/Products/ I had to add a browser_id_manager, temp_folder and session_data_manager in the way Zope 2.5 would do it. On the session_data_manager I have to disable to feature that SESSION will be stored in REQUEST since the function set_lazy is missing. I have to add a Transience Object Container into temp_folder after each restart of zope. How can I let Zope do that automatically on each restart ? Everything else is working. Regards, Dirk
Hi Dirk, Copy the code out of here: <http://cvs.zope.org/~checkout~/Zope/lib/python/OFS/Application.py?rev=1.188&content-type=text/plain> that starts out... # Ensure that there is a transient container in the temp folder tf = app.temp_folder if not hasattr(aq_base(tf), 'session_data'): env_has = os.environ.get from Products.Transience.Transience import TransientObjectContainer addnotify = env_has('ZSESSION_ADD_NOTIFY', None) .. and so on... and put it in the Application.py of 2.3.3.. HTH, - C Dirk Datzert wrote:
Hi Chris,
ok I tried it.
Here my results running on Zope-2.3.3, Python 2.1.3:
with Sessions, Transience and TemporaryFolder from cvs.zope.org/Products/
I had to add a browser_id_manager, temp_folder and session_data_manager in the way Zope 2.5 would do it. On the session_data_manager I have to disable to feature that SESSION will be stored in REQUEST since the function set_lazy is missing.
I have to add a Transience Object Container into temp_folder after each restart of zope. How can I let Zope do that automatically on each restart ?
Everything else is working.
Regards, Dirk
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
Thanks Chris, that works fine now. I hope that the KeyError isn't reported any longer. Regards, Dirk
Note that the Sessioning API is different than the CST API... you'll probably need to drop a few Python Scripts or whatnot in to adapt between them in order to make your old code work. See http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions.stx and the help system ("Sessioning API") for more info on the newer API. Dirk Datzert wrote:
Thanks Chris,
that works fine now. I hope that the KeyError isn't reported any longer.
Regards, Dirk
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
Thanks again Chris, I switched all DTML/Python code from sessionDM to session_data_manager and it worked instantly :-) Regards, Dirk Chris McDonough schrieb:
Note that the Sessioning API is different than the CST API... you'll probably need to drop a few Python Scripts or whatnot in to adapt between them in order to make your old code work. See http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions.stx and the help system ("Sessioning API") for more info on the newer API.
Dirk Datzert wrote:
Thanks Chris,
that works fine now. I hope that the KeyError isn't reported any longer.
Regards, Dirk
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
_______________________________________________ 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 )
On 11/9/02 9:06 pm, "Dirk Datzert" <dirk.datzert@tks-rasselstein.thyssenkrupp.com> wrote:
Hi,
Is it possible to use the Products Session, Transience and TemporaryFolder under Zope-2.3.3 ? Than the CoreSessionTracking could be removed and my Problem is solved ?
Regards, Dirk
Phew! - sorry Dirk, I was just pointing where the stuff was to give you a 'leg-up' and Chris some help. I have *no idea* whether all that stuff would work, but if you're into thinking you want to do all that, why not re-examine why you *need* to run 2.3.3? HTH Tone -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
participants (3)
-
Chris McDonough -
Dirk Datzert -
Tony McDonald