import sys reload(sys) sys.setdefaultencoding("utf-8")
Error:
reload is not declared
Then
import sys sys.setdefaultencoding("utf-8")
report an error
AttributeError: module 'sys' has no attribute 'setdefaultencoding'
Discovered by Baidu
Python3字符串默认编码unicode, 所以sys.setdefaultencoding也不存在了。。。。。。
So just delete it.