UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 377826: invalid start byte

前端 未结 2 654
余生分开走
余生分开走 2021-01-17 10:13

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()

相关标签:
2条回答
  • 2021-01-17 10:15

    0x92 is a smart quote(’) of Windows-1252. It simply doesn't exist in unicode, therefore it can't be decoded.

    Maybe your file was edited by a Windows machine which basically caused this problem?

    0 讨论(0)
  • 2021-01-17 10:37

    Use encoding='cp1252' will solve the issue.

    0 讨论(0)
提交回复
热议问题