After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590156 - error whilst pushing tree
error whilst pushing tree
Status: RESOLVED OBSOLETE
Product: sysadmin
Classification: Infrastructure
Component: Git
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2009-07-29 15:43 UTC by Bastien Nocera
Modified: 2013-11-21 14:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2009-07-29 15:43:03 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):
  • File "/home/admin/gitadmin-bin/gnome-post-receive-email", line 905 in ?
    main()
  • File "/home/admin/gitadmin-bin/gnome-post-receive-email", line 901 in main
    change.send_emails()
  • File "/home/admin/gitadmin-bin/gnome-post-receive-email", line 185 in send_emails
    self.send_extra_emails()
  • File "/home/admin/gitadmin-bin/gnome-post-receive-email", line 348 in send_extra_emails
    oldrev=parent, newrev=commit.id)
  • File "/home/admin/gitadmin-bin/gnome-post-receive-email", line 124 in generate_header
    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

Comment 1 Todd Zullinger 2009-07-29 22:37:10 UTC
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.
Comment 2 Bastien Nocera 2009-07-29 22:53:54 UTC
"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
Comment 3 Todd Zullinger 2009-07-29 23:13:32 UTC
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?
Comment 4 Bastien Nocera 2009-07-30 00:05:27 UTC
Mine no, Sébastien, yes :)
Comment 5 Olav Vitters 2009-07-30 05:46:21 UTC
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')
Comment 6 Olav Vitters 2009-07-30 05:49:10 UTC
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
Comment 7 Andrea Veri 2013-11-21 14:56:24 UTC
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