UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xa1 in position 26: illegal multibyte sequence
進入報錯源碼
python
\lib\subprocess.py
shell
由於是codec
相關報錯session
就搜索encoding
,爲何搜這個就是代碼寫多了感受
rest
咱們會發現這樣一段code
def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): #encoding是空怪不得是gbk報錯 #直接修改encoding=utf8
解決啦~~源碼