原文:Django啟動報錯:AttributeError: 'str' object has no attribute 'decode'

Exception in thread Thread : Traceback most recent call last : File usr local lib python . threading.py , line , in bootstrap inner self.run File usr local lib python . threading.py , line , in run s ...

2020-03-04 17:03 0 839 推薦指數:

查看詳情

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 ...

Wed Sep 25 06:49:00 CST 2019 0 18837
 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM