We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am recovering the logs of a repository with repo.git.log() and run into decoding charset error. Trace follows:
--------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-34-7aab8d0e3a89> in <module>() ----> 1 git.log() /usr/local/lib/python2.7/dist-packages/git/cmd.pyc in <lambda>(*args, **kwargs) 448 if name[0] == '_': 449 return LazyMixin.__getattr__(self, name) --> 450 return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) 451 452 def _set_cache_(self, attr): /usr/local/lib/python2.7/dist-packages/git/cmd.pyc in _call_process(self, method, *args, **kwargs) 900 # END provide better error message 901 else: --> 902 return self.execute(make_call(), **_kwargs) 903 # END handle windows default installation 904 /usr/local/lib/python2.7/dist-packages/git/cmd.pyc in execute(self, command, istream, with_keep_cwd, with_extended_output, with_exceptions, as_process, output_stream, stdout_as_string, kill_after_timeout, with_stdout, **subprocess_kwargs) 696 697 if isinstance(stdout_value, bytes) and stdout_as_string: # could also be output_stream --> 698 stdout_value = stdout_value.decode(defenc) 699 700 # Allow access to the command's status code /usr/lib/python2.7/encodings/utf_8.pyc in decode(input, errors) 14 15 def decode(input, errors='strict'): ---> 16 return codecs.utf_8_decode(input, errors, True) 17 18 class IncrementalEncoder(codecs.IncrementalEncoder): UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in position 25865158: invalid start byte
Adding .decode(defenc, 'ignore') doesn't solve the issue.
Any ideas about how to solve that?
Thanks
The text was updated successfully, but these errors were encountered:
After upgrading GitPython the issue remains. Trace follows:
--------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) <ipython-input-81-7aab8d0e3a89> in <module>() ----> 1 git.log() /usr/local/lib/python2.7/dist-packages/git/cmd.pyc in <lambda>(*args, **kwargs) 448 self._git_options = () 449 --> 450 # Extra environment variables to pass to git commands 451 self._environment = {} 452 /usr/local/lib/python2.7/dist-packages/git/cmd.pyc in _call_process(self, method, *args, **kwargs) 900 # END utility to recreate call after changes 901 --> 902 if sys.platform == 'win32': 903 try: 904 try: /usr/local/lib/python2.7/dist-packages/git/cmd.pyc in execute(self, command, istream, with_keep_cwd, with_extended_output, with_exceptions, as_process, output_stream, stdout_as_string, kill_after_timeout, with_stdout, **subprocess_kwargs) 696 def as_text(stdout_value): 697 return not output_stream and safe_decode(stdout_value) or '<OUTPUT_STREAM>' --> 698 # end 699 700 if stderr_value: /usr/lib/python2.7/encodings/utf_8.pyc in decode(input, errors) 14 15 def decode(input, errors='strict'): ---> 16 return codecs.utf_8_decode(input, errors, True) 17 18 class IncrementalEncoder(codecs.IncrementalEncoder): UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in position 25865158: invalid start byte
Need to be said I think that I'm having this issue with IPython. Any advices about how to solve that, please?
Sorry, something went wrong.
It was a locale issue. After installing en_US.UTF-8 as a default locale, everything works fine.
No branches or pull requests
I am recovering the logs of a repository with repo.git.log() and run into decoding charset error. Trace follows:
Adding .decode(defenc, 'ignore') doesn't solve the issue.
Any ideas about how to solve that?
Thanks
The text was updated successfully, but these errors were encountered: