报错了:
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xb0 in position 1: ordinal not in range(128)
应该是出了编码问题
在python的Lib\site-packages文件夹下新建一个sitecustomize.py:
import sys
sys.setdefaultencoding('gb2312')
再次运行,OK,问题解决了,看一下结果:
- 或者在代码中加入下面几行代码
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )