[Buildbot-commits] [Buildbot] #2407: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 58: ordinal not in range(128)

Buildbot nobody at buildbot.net
Wed Dec 5 02:51:16 UTC 2012


#2407: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 58: ordinal not in range(128)
---------------------+------------------------
Reporter:  mattiasr  |       Owner:
    Type:  defect    |      Status:  new
Priority:  major     |   Milestone:  undecided
 Version:  0.8.7     |  Resolution:
Keywords:            |
---------------------+------------------------

Comment (by dustin):

 It looks like the weird thing that looks like a repr ({{{<unicode object
 at .. with str error:..>}}}) is from Twisted.  In particular, it's what
 safe_str(..) will do when you hand it unicode:
 {{{
 >>> from twisted.python import reflect
 >>> reflect.safe_str(u'\u9843')
 '<unicode instance at 0x842660 with str error:\n Traceback (most recent
 call last):\n  File
 "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-
 packages/twisted/python/reflect.py", line 548, in _safeFormat\n    return
 formatter(o)\nUnicodeEncodeError: \'ascii\' codec can\'t encode character
 u\'\\u9843\' in position 0: ordinal not in range(128)\n>'
 }}}

 But as the user in the SO post asks, it's not easy to tell *which*
 invocation of {{{log.msg}}} is causing this.  The invocation in
 {{{master.addChange}}} is careful to convert to utf-8 first.

 By omission, I bet it's the equivalent of:
 {{{
 2012-12-04 21:49:10-0500 [-] checking for User Object from git Change for:
 Dustin J. Mitchell <dustin at mozilla.com>
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2407#comment:2>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list