python2 报错:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 0: ordinal not in range(128)

解决方法:

import sys
if sys.getdefaultencoding() != 'utf-8':
    reload(sys)
    sys.setdefaultencoding('utf-8')

  

原文地址:https://www.cnblogs.com/fh-fendou/p/8528773.html