Learn more about these different git repos.
Other Git URLs
https://bugzilla.redhat.com/show_bug.cgi?id=1629488
This is probably due to Unicode handling differences between Python 2 and Python 3: self.path gets set to the likes of u'/tmp/göran', and Python 2 will fail trying to convert that with str() in /usr/lib/python2.7/site-packages/git/repo/base.py:
self.path
u'/tmp/göran'
str()
/usr/lib/python2.7/site-packages/git/repo/base.py
[tim@passepartout ~]$ echo $LANG de_DE.UTF-8 [tim@passepartout ~]$ git init /tmp/göran Leeres Git-Repository in /tmp/göran/.git/ initialisiert [tim@passepartout ~]$ python3 -c "import git; g = git.Repo(u'/tmp/göran')" [tim@passepartout ~]$ python2 -c "import git; g = git.Repo(u'/tmp/göran')" Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/git/repo/base.py", line 125, in __init__ epath = str(epath) UnicodeEncodeError: 'ascii' codec can't encode characters in position 6-7: ordinal not in range(128) [tim@passepartout ~]$ python3 -c "str(u'/tmp/göran')" [tim@passepartout ~]$ python2 -c "str(u'/tmp/göran')" Traceback (most recent call last): File "<string>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode characters in position 6-7: ordinal not in range(128) [tim@passepartout ~]$
Changing the call in pyrpkg.Commands.load_repo() to:
pyrpkg.Commands.load_repo()
self._repo = git.Repo(self.path.encode('UTF-8'))
works for me (Fedora 28 with German locale), but is probably not The Right Thing™ to do.
Original BZ ticket was closed. I tried it on F30 and F31 and it worked.
Metadata Update from @onosek: - Issue close_status updated to: Invalid - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.