安装mysql-python报错: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 65: ordinal not in range(128) 需要先安装(yum): mysql-develpython-devel…
[root@linux-node1 桌面]# salt-key [ERROR ] 'ascii' codec can't decode byte 0xe6 in position 6: ordinal not in range(128) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/salt/utils/parsers.py", line 210, in parse_args proc…
当我在运行一个基于scrapy的爬虫时出现UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 12: ordinal not in range(128)的报错,原因是原因就是python的str默认是ascii编码,和unicode编码冲突. 解决办法:在代码中加入 import sys reload(sys) sys.setdefaultencoding('utf8') 就可以解决.…
[python-HTMLTestRunner]生成HTMLTestRunner报告报错:ERROR 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128) 需要在HTMLTestRunner开头转化utf-8的代码import sysreload(sys)sys.setdefaultencoding('utf8') 问题解决…