解決 UnicodeDecodeError: 'ascii' codec can't decode 錯誤

Ctrl + B 沒結果。python

查看控制檯信息 以下:ide


Running python -u -i C:\2.py
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 337, in run_
  File ".\exec.py", line 154, in run
  File ".\exec.py", line 45, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd3 in position 1035: ordinal not in range(128)code


解決方法:ci

    exec.pyit

    sublime_plugin.py 兩個文件io

前面加上 以下代碼
ast

    import sys 
    reload(sys) 
    sys.setdefaultencoding('gbk')
相關文章
相關標籤/搜索