报错:UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-3: ordinal not in range(128)
解决方法,在文件开头添加:
import sys;
reload(sys);
sys.setdefaultencoding(
'utf8'
)
报错:UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-3: ordinal not in range(128)
解决方法,在文件开头添加:
import sys;
reload(sys);
sys.setdefaultencoding(
'utf8'
)