Python3 UnicodeEncodeError

报错信息

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())

你可能感兴趣的:(Python3 UnicodeEncodeError)