[ZCM] [ZC] 264/ 1 Request "AttributeError: 'None' object has no attribute 'load'
Collector: Zope Bugs and Patches ...
zope-coders@zope.org
Tue, 05 Mar 2002 10:04:24 -0500
"
X-Recipients-debug: ['htrd', 'htrd', 'klm', 'Brian', 'chrism', ('_Pending_ recipient', 'zope-collector-monitor@zope.org')]
Issue #264 Update (Request) "AttributeError: 'None' object has no attribute 'load'
"
Status Pending, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/264
==============================================================
= Request - Entry #1 by htrd on Mar 5, 2002 10:04 am
Uploaded: "setstate.diff"
- http://collector.zope.org/Zope/264/setstate.diff/view
2002-03-05T14:12:53 ERROR(200) ZODB Couldn't load state for '\x00\x00\x00\x00\x00\x00\x17-'
Traceback (innermost last):
File /home/tdickenson/projects/Zope2/lib/python/ZODB/Connection.py, line 469, in setstate
AttributeError: 'None' object has no attribute 'load'
The zope lists have seen numerous reports of tracebacks like the one below. The concensus was they were harmless, but (as far as I know) noone has properly diagnosed what was going on.
This traceback is generated when ZODB is asked to load the state of an object outside a transaction, when the connection is closed. This can be triggered by a standard_error_message object, or even the standard error page, because it is rendered *after* aborting the transaction.
Even worse, I think it is possible for the persistent object to be connected to a different transaction before the error message is rendered.
Im not sure of the right fix. In ZPublisher/publish.py publish function, should the call to transaction_manager.abort() occur *after* the err_hook stuff?
This patch just makes the error message nicer.
==============================================================