GNOME Bugzilla – Bug 590156
error whilst pushing tree
Last modified: 2013-11-21 14:56:24 UTC
Trying to push commit c7735102a4525c669cf06d3ed4521901961d940f into nautilus-sendto master. $ git push Counting objects: 49, done. Delta compression using 2 threads. Compressing objects: 100% (26/26), done. Writing objects: 100% (26/26), 4.97 KiB, done. Total 26 (delta 16), reused 0 (delta 0) Traceback (most recent call last):
+ Trace 216699
main()
change.send_emails()
self.send_extra_emails()
oldrev=parent, newrev=commit.id)
print >>out, s(""" UnicodeDecodeErrorTo ssh://git.gnome.org/git/nautilus-sendto 8723e86..c773510 master -> master : 'ascii' codec can't decode byte 0xe2 in position 29: ordinal not in range(128) error: hooks/post-receive exited with error code 1
Ouch, sorry for the trouble Bastien. Olav has reverted the offending patch. I'm curious to know what the data was that caused the error (i.e. the value of fullname), so I can work out how best to improve the code. We've not run into any troubles with this on fedora's boxes (yet). If I had to guess, perhaps the username contains non-ascii data that is encoded in iso-8859-1 (or -15) rather than in utf-8. Not being a gnome-sysadmin, I've got no access to check that theory. I'm still not sure how such data would not barf in the Header.Header() call, instead making it to line 124 in generate_header() before croaking though.
"ascii" codec. So I guess it could have been any data in UTF-8 causing the problem. It ended up in the repo just fine: http://git.gnome.org/cgit/nautilus-sendto/patch/?id=c7735102a4525c669cf06d3ed4521901961d940f
The try/except block _should_ have tested for non-ascii and only if encoding the string as ascii encoded the header using python's email.Header.Header() (to render it something like '=?utf-8?b?VMO2ZGQ=?='). But somehow the data passed either the unicode(fullname, 'ascii') call or was successfully encoded by email.Header and still had the non-ascii '0xe2' in it. I expected that would not be possible (and obviously I was wrong). (The code in question, so no one reading has to dig it out of git, goes like this: if fullname != "": try: user_fullname = unicode(fullname, 'ascii') except UnicodeDecodeError: user_fullname = Header.Header(fullname, 'utf-8').encode() Later, user_fullname is used to build from_address, which is what was being parsed on line 124 where the traceback occurred.) Do you know if your gecos entry on gnome.org has any non-ascii characters in it? And if so, what encoding is used for the data?
Mine no, Sébastien, yes :)
getent passwd hadess | cut -d : -f 5 | od -t x1 0000000 42 61 73 74 69 65 6e 20 4e 6f 63 65 72 61 0a 0000017 Following works fine: user_fullname = unicode(fullname, 'ascii')
getent passwd sbacher| cut -d : -f 5 | od -t x1 0000000 53 65 62 61 73 74 69 65 6e 20 42 61 63 68 65 72 0000020 0a 0000021
The GNOME Infrastructure Team is currently migrating its bug / issue tracker away from Bugzilla to Request Tracker and therefore all the currently open bugs have been closed and marked as OBSOLETE. The following move will also act as a cleanup for very old and ancient tickets that were still living on Bugzilla. If your issue still hasn't been fixed as of today please report it again on the relevant RT queue. More details about the available queues you can report the bug against can be found at https://wiki.gnome.org/Sysadmin/RequestTracker. Thanks for your patience, the GNOME Infrastructure Team