python : 'ascii' codec can't de

python <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128)解决

python : 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128)

import sys
import os
import string
reload(sys)
sys.setdefaultencoding("utf8")

 

上一篇:python3 中文乱码 UnicodeEncodeError: ‘latin-1‘ codec can‘t encode characters


下一篇:Docker内报错UnicodeEncodeError: ‘ascii‘ codec can‘t encode character ‘\u516c‘ in position 0