windows git review报错。UnicodeDecodeError

Traceback (most recent call last):

File "c:\gary\software\tool\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main

return _run_code(code, main_globals, None,

File "c:\gary\software\tool\python\python38-32\lib\runpy.py", line 86, in _run_code

exec(code, run_globals)

File "C:\Gary\software\Tool\Python\Python38-32\Scripts\git-review.exe\__main__.py", line 9, in <module>

File "c:\gary\software\tool\python\python38-32\lib\site-packages\git_review\cmd.py", line 1714, in main

_main()

File "c:\gary\software\tool\python\python38-32\lib\site-packages\git_review\cmd.py", line 1587, in _main

check_remote(branch, remote, config['scheme'],

File "c:\gary\software\tool\python\python38-32\lib\site-packages\git_review\cmd.py", line 781, in check_remote

has_color = check_color_support()

File "c:\gary\software\tool\python\python38-32\lib\site-packages\git_review\cmd.py", line 696, in check_color_support

(status, output) = run_command_status(test_command)

File "c:\gary\software\tool\python\python38-32\lib\site-packages\git_review\cmd.py", line 140, in run_command_status

(out, nothing) = p.communicate(stdin)

File "c:\gary\software\tool\python\python38-32\lib\subprocess.py", line 1011, in communicate

stdout = self.stdout.read()

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa7 in position 21: illegal multibyte sequence

 

解决办法:

python安装的目录下,Python38-32\Lib\有个文件subprocess.py,encoding=NONE 改为encoding='utf-8' 就可以

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值