原文:django項目啟動時報 'str' object has no attribute 'decode'

今天在啟動django項目是報錯AttributeError: str object has no attribute decode , 項目連接數據庫時,出現這個錯誤,報錯截圖 處理過程: 點擊最后一個報錯信息,進入到下面這個頁面 處理結果: 將上圖用紅色印記圈起來的代碼直接注釋掉,或者將代碼里面的decode直接變為encode,這樣的話項目就會正常啟動,並且不會報錯 ...

2021-02-20 22:46 0 405 推薦指數:

查看詳情

python2 'str' object has no attribute 'decode'

上述代碼,報錯: 'str' object has no attribute 'decode' 查找原因: https://stackoverflow.com/questions/29030725/str-object-has-no-attribute-decode You ...

Sat Apr 28 02:54:00 CST 2018 0 10040
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM