unicodedecodeerror: ' ASCII ' codec can ' t decode byte 0xe5 in position 0:ordinal not in range
1. I began to think that I wrote a python problem, but later found that the same code on other computers running normal ...
2. According to the online method of what load (SYS), or add #-*-Coding:utf-8-*-Way, although all know is python2 years of things. But as soon as the disease Touyi. The result is still invalid.
3. Doubts about CentOS7 Lang problem, the result changed also useless ...
4. Suspicion is a python3.4 problem, and an additional python3.6 is installed. Results two version of the wrong place is still exactly the same.
Then, since there is no reasonable explanation of the problem on the Internet, it is directly on the soil method ~ ~ Black Cat White Cat, the first to catch the mouse again.
Important actions are as follows:
cd/usr/lib64/python3.4/encodings/#python3. x should be the same MV ascii.py Ascii.py.bak #这也算给自己留条后路, and so on will find a problem in the future, can return again. CP utf_8.py ascii.py
Directly with utf_8.py replaced that see the Chinese error ascii.py problem fix. If you find any side effects in the future, you can change them back.
The suspected real point of failure should still be on my CentOS7 system, but it's never a simple change to Lang. Those who really know the truth will find out in the future someday.
Before that, I have the same problem with the small partners, you can first with me to use the earth ~:)
This article is from the "Notes" blog, please be sure to keep this source http://ezaze.blog.51cto.com/2184072/1927922
Centos7 python Chinese "unicodedecodeerror: ' ASCII ' codec can ' t decode byte ..." Workaround