- A+
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7
问题描述:
python进行字符串操作时,出现以下报错:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)
解决方案:
import sys
reload(sys)
sys.setdefaultencoding('utf8')