Solve UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe5 in position 108: ordinal not in range(128)
Original link: https://wuzhuti.cn/python-decodeerror-ascii-codec-cant-decode import sys reload(sys) sys.setdefaultencoding(‘utf8’) Confused str and unicode data types in python2. 1. What you need is to have the encoding use the actual encoding instead of ascii 2. For the code that needs str->unicode, you can write the above code in front, and change the str encoding from ascii to utf8 […]