2022年1月13日星期四

subprocess.py UnicodeDecodeError: 'gbk' codec can't decode

   File "C:\Users\lyq\.conda\envs\py_mike\lib\subprocess.py", line 1479, in _readerthread

    buffer.append(fh.read())

UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 81: illegal multibyte sequence


编辑subprocess.py文件notepad .\subprocess.py

将subprocess.py中的class Popen类初始化的encoding=None修改为encoding='utf-8'

没有评论: