When Python is installed, the default encoding is ASCII, and when non-ASCII encoding occurs in the program, Python processing often reports such an error unicodedecodeerror: ' ASCII ' codec can ' t decode byte 0x?? In position 1:ordinal No in range (128) There are 2 ways to set Python's default encoding: Method One: Add the following code to the program: Import sys reload (SYS) sys.setdefaultencoding (' UTF8 ') method two: In the Python installation directory under/etc/python2.6 find sitecustomize.py, add the following: # ENCODING=UTF8 import sys reload (SYS) Sys.setdefaultencoding (' UTF8 ') restarts the Python interpreter, then executes the import syssys.getdefaultencoding () to find that the encoding has been set to UTF8, and after multiple reboots, the effect is the same. This is because the system at the time of Python startup, call the file itself, set the system's default encoding, and do not need to manually add each time to solve the code, is a once and for all solution. With the above modifications, TinyOS can generate the docs document normally.
The Python installer is reporting this error unicodedecodeerror: ' ASCII ' codec can ' t decode byte 0xb0 in position 1:ordinal not in range (128)