#4188 Traceback in the git hook if UTF-8 is used
Closed: Fixed 2 years ago by pingou. Opened 2 years ago by jskarvad.

I guess it's related to the UTF-8 in the changelong, I got the following traceback when called:

$ fedpkg push

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 762 bytes | 762.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Emitting a message to the fedmsg bus.
remote: * Publishing information for 1 commits
remote: Traceback (most recent call last):
remote:   File "/usr/lib/python2.7/site-packages/pagure/hooks/__init__.py", line 394, in run_project_hooks
remote:     changes=changes,
remote:   File "/usr/lib/python2.7/site-packages/pagure/hooks/__init__.py", line 111, in runhook
remote:     changes=changes,
remote:   File "/usr/lib/python2.7/site-packages/pagure/hooks/default.py", line 279, in post_receive
remote:     session, project, repodir, username, refname, commits, forced
remote:   File "/usr/lib/python2.7/site-packages/pagure/hooks/default.py", line 72, in send_notifications
remote:     name = pagure.lib.git.get_author(rev, repodir)
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/git.py", line 1317, in get_author
remote:     ["log", "-1", '--pretty=format:"%an"', commit], abspath
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/git.py", line 1261, in read_git_lines
remote:     args, abspath, keepends=keepends, **kw
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/git.py", line 1246, in read_git_output
remote:     **kw
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/git.py", line 1227, in read_output
remote:     out = out.rstrip("\n\r")
remote: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 10: ordinal not in range(128)
remote: Sending to redis to log activity and send commit notification emails

I am not sure whether this is the correct place to report, sorry if not.

Metadata Update from @pingou:
- Issue assigned to pingou
- Issue set to the milestone: 5.3
- Issue tagged with: bug

2 years ago

Login to comment on this ticket.

Related Pull Requests
  • #4190 Merged 2 years ago