解决Python2.7的UnicodeEncodeError: ‘ascii’ codec can’t encode异常错误
2021-07-01 20:04
标签:soscw enc python2 src sys odi error error: blog 首先添加如下代码: import sys reload(sys) sys.setdefaultencoding(‘utf-8‘) 如果继续报错:LookupError: unknown encoding: cp0 则在系统变量中加上PYTHONIOENCODING,变量值为utf-8 参考链接: 1.http://wangye.org/blog/archives/629/ 2.https://blog.csdn.net/u010239102/article/details/78126822 解决Python2.7的UnicodeEncodeError: ‘ascii’ codec can’t encode异常错误 标签:soscw enc python2 src sys odi error error: blog 原文地址:https://www.cnblogs.com/rebaomi/p/9636346.html
文章标题:解决Python2.7的UnicodeEncodeError: ‘ascii’ codec can’t encode异常错误
文章链接:http://soscw.com/index.php/essay/100460.html