安装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…
[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') 问题解决…
今天在验证字符串是否包含的时候报错:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 12: ordinal not in range(128) 原因是python的str默认是ascii编码,和unicode编码冲突,就会报这个错误. 解决办法: import sys reload(sys) sys.setdefaultencoding('utf8')…