[ZCM] [ZC] 2155/12 Comment "_log() got an unexpected keyword
argument 'error'"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Fri Nov 17 10:37:49 EST 2006
Issue #2155 Update (Comment) "_log() got an unexpected keyword argument 'error'"
Status Resolved, Zope/bug+solution critical
To followup, visit:
http://www.zope.org/Collectors/Zope/2155
==============================================================
= Comment - Entry #12 by olivluca on Nov 17, 2006 10:37 am
A fresh checkout of the 2.9 branch, and a simple grep shows that there are still some places where "error" is passed as an argument:
lib/python/Products/Sessions/SessionDataManager.py
lib/python/Products/Five/fiveconfigure.py
lib/python/OFS/ObjectManager.py
lib/python/Shared/DC/ZRDB/Connection.py
And these are the files where exc_info is passed as sys.exc_info() instead of 'True':
lib/python/App/RefreshFuncs.py
lib/python/Shared/DC/ZRDB/Connection.py
________________________________________
= Resolve - Entry #11 by tseaver on Nov 5, 2006 12:52 pm
Status: Pending => Resolved
This bug was fixed (as #2205) on the 2.9 branch *after* 2.9.5 was released.
Here is the relevant changelog stuff:
Zope 2.9.6 (unreleased)
Bugs fixed
- Collector #2218: fixed wrong logger argument in OFS/Cache.py
- Collector #2205: fixed wrong logger argument in ZRDB/Connection.py
- Collector #2208: rewriting/setting the 'charset' part of the
content-type HTTP header will be done only for 'text/*'
Zope 2.9.5 (2006/10/03)
________________________________________
= Resubmit - Entry #10 by pupq on Nov 5, 2006 10:43 am
Status: Resolved => Pending
Uploaded: "diffs"
- http://www.zope.org/Collectors/Zope/2155/diffs/view
I'm not sure I understand the original problem, exactly, but I encountered "_log() got an unexpected keyword argument 'error'" when starting up my Zope *with* Zope 2.9.5 (Python 2.4.4c1, using Plone 2.5.1).
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module App.special_dtml, line 176, in _exec
Module DocumentTemplate.DT_Let, line 76, in render
Module DocumentTemplate.DT_In, line 643, in renderwob
Module DocumentTemplate.DT_In, line 771, in sort_sequence
Module ZODB.Connection, line 732, in setstate
Module ZODB.Connection, line 786, in _setstate
Module ZODB.serialize, line 605, in setGhostState
Module Shared.DC.ZRDB.Connection, line 74, in __setstate__
Module logging, line 999, in error
TypeError: _log() got an unexpected keyword argument 'error'
I found instances of logger.error(... error=...) in Zope 2.9.5, and changed those to logger.error(... exc_info=); this seems to resolve the problem, but I'm not sure that's the entire fix. (If it were that obvious, did the earlier authors in this thread just miss the cases of "error="? Dunno.
Diff from a clean 2.9.5 to 2.9.5-with-error=-switched attached. HTH.
________________________________________
= Resolve - Entry #9 by dreamcatcher on Aug 18, 2006 12:54 pm
Status: Pending => Resolved
Fixed on 2.9, 2.10 and trunk.
________________________________________
= Comment - Entry #8 by dreamcatcher on Aug 18, 2006 10:37 am
This is a critical issue. It renders sites using access rules useless :(
________________________________________
= Edit - Entry #7 by dreamcatcher on Aug 18, 2006 10:36 am
Changes: edited transcript, importance (medium => critical)
________________________________________
= Comment - Entry #6 by x on Aug 10, 2006 5:16 pm
There's also a couple of instances of this in (Zope 2.9.4) ZPublisher/BeforeTraverse.py
________________________________________
= Comment - Entry #5 by Pigletto on Jul 24, 2006 7:11 am
Sorry about my mistake with exc_info() instead of True.
The same thing applies to other files too. I've found:
/lib/python/ZPublisher/BeforeTraverse.py
/lib/python/ZPublisher/BeforeTraverse.py
/lib/python/Products/ZCatalog/ZCatalog.py #has exc_info=sys.exc_info()
/lib/python/App/RefreshFuncs.py
/lib/python/OFS/ObjectManager.py
________________________________________
= Resubmit - Entry #4 by shh on Jul 24, 2006 6:09 am
Status: Resolved => Pending
Wrong, this should be: exc_info=True
________________________________________
= Resolve - Entry #3 by ajung on Jul 21, 2006 9:21 am
Status: Pending => Resolved
Fixed on the 2.9 branch.
________________________________________
= Edit - Entry #2 by ajung on Jul 21, 2006 9:20 am
Changes: importance (critical => medium)
________________________________________
= Request - Entry #1 by Pigletto on Jul 21, 2006 9:13 am
File lib/python/Shared/DC/ZRDB/Connection.py has two errors:
in line number 73:
logger.error('Error connecting to relational database.',
error=exc_info())
and should be:
logger.error('Error connecting to relational database.',
exc_info=exc_info())
Similarly line 153:
logger.error('Error closing relational database connection.',
error=exc_info())
should be changed to:
logger.error('Error closing relational database connection.',
exc_info=exc_info())
==============================================================
More information about the Zope-Collector-Monitor
mailing list