Python3 UnicodeEncodeError
2020-12-07 本文已影响0人
湯木
报错信息
UnicodeEncodeError: 'ascii' codec can't encode character '\u5dfe' in position 11: ordinal not in range(128)
解决方案
import sys
import codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())