Bugs item #2629586, was opened at 2009-02-23 08:41
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=262958…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: rewrite
Group: None
Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: NicDumZ Nicolas Dumazet (nicdumz)
Assigned to: Russell Blau (russblau)
Summary: TerminalHandler.emit crashes when message is a string
Initial Comment:
Sometimes self.format(record) can return a string, and this case is currently not
handled.
How to trigger this behavior ?
1) modify Site.loadpageinfo() so that the error "u"loadpageinfo: Query on %s
returned data on '%s' will be raised everytime.
2) run category.py move -from:nonasciititle -to:nonasciititle2
3) the loadpageinfo error will be triggered; category.py will catch this Error at
top-level and will call pywikibot.logging.exception("Fatal error:")
Here, this gives :
pywikibot/scripts$ python category.py move -from:"Athlte du combin nordique aux Jeux
olympiques" -to:"Coureur du combin nordique aux Jeux olympiques" -debug
Reading dump from category.dump.bz2
Found 1 wikipedia:fr processes running, including this one.
Traceback (most recent call last):
File ".../pywikibot/bot.py", line 95, in emit
"xmlcharrefreplace"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 671:
ordinal not in range(128)
Dumping to category.dump.bz2, please wait...
I don't understand exactly how a string is returned by format(), and why a unicode
message is expected, but it happens.
The stacktrace here is parcticularly cryptic. True, I'm still not used to the logging
system, but I had to place manually old-fashioned "print"s everywhere to track
the issue and understand what CAUSED this. :/
I have patched emit() in r6423 so it doesn't crash on a string message. However, Russ,
I think that you might want to fix the source of the problem, in the logging system
itself, rather than solving the effect. Feel free to revert this :)
----------------------------------------------------------------------
Comment By: SourceForge Robot (sf-robot)
Date:
2010-01-21 02:20
Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2010-01-06 19:04
Message:
I'm not sure if there is anything here that still needs to be fixed; fixing
bugs in the logging module is certainly outside the abilities of this
project! ;-)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=262958…