You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Systems with non-English locales fail in some cases #290
Ensure a non-English locale is available on your system. In my case (Ubuntu 14.04 LTS), I had to do sudo locale-gen fr_FR.UTF-8 && sudo dpkg-reconfigure locales
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/earwig/.local/lib/python2.7/site-packages/GitPython-1.0.1-py2.7.egg/git/remote.py", line 651, in fetch
res = self._get_fetch_info_from_stderr(proc, progress or RemoteProgress())
File "/home/earwig/.local/lib/python2.7/site-packages/GitPython-1.0.1-py2.7.egg/git/remote.py", line 588, in _get_fetch_info_from_stderr
for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info))
File "/home/earwig/.local/lib/python2.7/site-packages/GitPython-1.0.1-py2.7.egg/git/remote.py", line 588, in <genexpr>
for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info))
File "/home/earwig/.local/lib/python2.7/site-packages/GitPython-1.0.1-py2.7.egg/git/remote.py", line 241, in _from_line
raise ValueError("Failed to parse line: %r" % line)
ValueError: Failed to parse line: u' = [\xe0 jour] develop -> origin/develop'
I am still trying to reproduce the issue on a VM, but have nonetheless provided a potential fix. You might be able to verify it earlier than I do - I will however keep you posted.
Please try the latest master - even on a virtual machine I was unable to get git into non-english mode, for some reason. Any other program I used (e.g. ls, date) reported in french, as expected.
Thanks for uploading the video, it was interesting to watch. Sorry to make you spend a while on something I hoped wouldn't take very long!
I'm not sure why you weren't able to get git in another language. I followed nearly the same procedure as you in the VM and I was able to do it. These things tend to be shaky, so maybe it's down to a difference in Ubuntu version or installed packages?
At any rate, the provided fix works for me. I asked the original reporter to test it, but I suspect it will work for him too.
Good to hear ! Please feel free to close this issue once it works for the upstream reporter.
NOTE: I'd probably want to make a new release on pypi, but unfortunately they lost support for OpenID, which terminated my account as well. There is no way for me to login, and the site to reset an account doesn't work either ... . I will reach out to @empty to re-authenticate the new account I made.
@nvie Warning lines could be ignored above this line quite nicely. It might even work assuming that the language of ssh is always changed to english if GitPython invokes git with the respective environment variable set.
If you would like to get your hands dirty and submit a PR, I'd happily merge it.
Thanks and cheers !
Activity
fix(git-cmd): use LC_ALL instead of LC_MESSAGES
Byron commentedon May 31, 2015
I am still trying to reproduce the issue on a VM, but have nonetheless provided a potential fix. You might be able to verify it earlier than I do - I will however keep you posted.
fix(git-cmd): set LANGUAGE as well
Byron commentedon May 31, 2015
Please try the latest master - even on a virtual machine I was unable to get git into non-english mode, for some reason. Any other program I used (e.g.
ls,date) reported in french, as expected.Byron commentedon May 31, 2015
You can watch the development stream on youtube.
GitPython #2 [fix issue 290 - enforce C locale]earwig commentedon Jun 1, 2015
Thanks for uploading the video, it was interesting to watch. Sorry to make you spend a while on something I hoped wouldn't take very long!
I'm not sure why you weren't able to get git in another language. I followed nearly the same procedure as you in the VM and I was able to do it. These things tend to be shaky, so maybe it's down to a difference in Ubuntu version or installed packages?
At any rate, the provided fix works for me. I asked the original reporter to test it, but I suspect it will work for him too.
Byron commentedon Jun 1, 2015
Good to hear ! Please feel free to close this issue once it works for the upstream reporter.
NOTE: I'd probably want to make a new release on pypi, but unfortunately they lost support for OpenID, which terminated my account as well. There is no way for me to login, and the site to reset an account doesn't work either ... . I will reach out to @empty to re-authenticate the new account I made.
nvie commentedon Aug 28, 2015
I've seen the following variant of this error sometimes when this is emitted from the underlying
sshcommand:ValueError: Failed to parse line: "Warning: Permanently added the RSA host key for IP address '192.30.***.***' to the list of known hosts."The initial git command thus fails, but retrying it typically makes it work again since the warning is not emitted a second time.
Perhaps a solution could be to ignore lines starting with
Warning:?Byron commentedon Aug 29, 2015
@nvie Warning lines could be ignored above this line quite nicely. It might even work assuming that the language of
sshis always changed to english if GitPython invokes git with the respective environment variable set.If you would like to get your hands dirty and submit a PR, I'd happily merge it.
Thanks and cheers !