用log.info('中文。。。。。')时报:'ascii' codec can't decode byte 0xe5 in position 3: ordinal not in range(128)错误
解决方法:在该文件的最上面添加
import sys
reload(sys)
sys.setdefaultencoding(‘utf8′)
就可以解决中文报错问题。。。。
本文提供了解决使用log.info('中文。。。。。')时报错误的解决方案,通过在文件顶部添加特定代码实现中文字符正确显示。
用log.info('中文。。。。。')时报:'ascii' codec can't decode byte 0xe5 in position 3: ordinal not in range(128)错误
解决方法:在该文件的最上面添加
import sys
reload(sys)
sys.setdefaultencoding(‘utf8′)
就可以解决中文报错问题。。。。
1万+
1213
7709
23万+
9598
1万+
1644
919
2189
1271
255
582

被折叠的 条评论
为什么被折叠?