遇到报错: AttributeError: module ‘sys’ has no attribute ‘setdefaultencoding’ 是因为python3默认使用的是utf-8的编码,所以只需要把这一句:sys.setdefaultencoding(‘utf8’)删除即可