feed-pqm aborts if proposal includes unmappable character
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Hydrazine |
In Progress
|
Medium
|
Unassigned |
Bug Description
I guess someone put a non-ascii character into either the status comment, or the commit message, which cannot be displayed on my system. I got a traceback and it killed the process, so I can't use feed-pqm until this gets cleared out.
Traceback (most recent call last):
File "C:/Users/
sys.
File "C:/Users/
show_mp(mp)
File "C:/Users/
print "%s: %s" % (comment.
File "C:\Python26\
return codecs.
UnicodeEncodeError: 'charmap' codec can't encode character u'\u201c' in position 571: character maps
to <undefined>
Related branches
- hydrazine-core: Pending requested
-
Diff: 17 lines (+6/-1)1 file modifiedfeed-pqm (+6/-1)
Changed in hydrazine: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in hydrazine: | |
status: | Confirmed → In Progress |
This is my 'trivial' fix for it:
=== modified file 'feed-pqm' all_comments) #XXX: See bug lp:583761 author. name, comment. message_ body) author. name, comment. message_ body)
--- feed-pqm 2010-06-28 19:13:18 +0000
+++ feed-pqm 2010-10-01 20:59:46 +0000
@@ -102,7 +102,12 @@
print "Recent comments:"
comments = list(mp.
for comment in comments[-1:]:
- print "%s: %s" % (comment.
+ val = "%s: %s" % (comment.
+ try:
+ print val
+ except UnicodeError:
+ val = val.encode('ascii', 'replace')
+ print val
def set_message(mp):