I am getting the following error while executing the below code snippet 
exactly at the line if uID in repo.git.log():, the problem is in 
repo.git.log(),the error happens way down in the bowels of the 
repo.git.log() command, I think because the output produced by the git 
command doesn't produce UTF-8. That could be because the git log contains 
non-UTF-8 data, or for a different reason.

how do I convert repo.git.log() into decode("utf-8")?

uID = 
if uID in repo.git.log():

Traceback (most recent call last):
  File "/prj/host_script/script.py", line 1417, in <module>
  File "/prj/host_script/script.py", line 1028, in main
    if uID in repo.git.log():
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 431, in 
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 802, in 
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 610, in 
    stdout_value = stdout_value.decode(defenc)
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 377826: 
invalid start byte

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to