原文:python3.6報錯:AttributeError: 'str' object has no attribute 'decode'

錯誤源代碼:class list.append folder.decode utf 修改方法:把decode改為encode即可。 ...

2019-04-13 14:14 0 4900 推薦指數:

查看詳情

AttributeError: 'str' object has no attribute 'decode'

python3下列代碼會報上邊的錯 print("Response:", resp.text.decode('unicode_escape'))解決辦法:print("Response:", resp.text.encode('utf-8').decode('unicode_escape ...

Mon Aug 10 18:23:00 CST 2020 0 888
 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM