'str'object has no attribute ‘decode‘解决方法

Python3的str 默认不是bytes,所以不能decode,只能先encode转为bytes,再decode
python2的str 默认是bytes,所以能decode

可以试试在线python2运行一下

posted @ 2021-09-02 15:18  Athena-ydy  阅读(2895)  评论(0)    收藏  举报