python的报错

1;;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

2;;

 

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

3;;

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 111: ordinal not in range(128)

 

之后解决方法是:在文件中最前面加入

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

不知道为什么加入:# -*- coding: utf-8 -*-不太好用

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

 

 

 

 

、、、、、、、、、、、、、、、、、、、、、、、、、、、

posted @ 2018-04-28 15:47  GXTon  阅读(123)  评论(0编辑  收藏  举报