Python3中出现UnicodeEncodeError: 'ascii' codec can't encode characters in ordinal not in ra

Posted 梧桐树

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python3中出现UnicodeEncodeError: 'ascii' codec can't encode characters in ordinal not in ra相关的知识,希望对你有一定的参考价值。

添加代码

import sys
import codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())

 

以上是关于Python3中出现UnicodeEncodeError: 'ascii' codec can't encode characters in ordinal not in ra的主要内容,如果未能解决你的问题,请参考以下文章