正确解决AttributeError: ‘str‘ object has no attribute ‘decode‘异常的有效解决方法
报错问题
AttributeError: ‘str‘ object has no attribute ‘decode‘异常
报错原因
AttributeError: ‘str’ object has no attribute ‘decode’ 这个异常通常意味着你正在尝试在一个已经是字符串(str)类型的对象上调用 decode 方法。在 Python 3 中,字符串默认就是 Unicode 字符串(str 类型),所以它们不需要(也不能