AttributeError: 'str' object has no attribute 'decode' django问题
生活随笔
收集整理的這篇文章主要介紹了
AttributeError: 'str' object has no attribute 'decode' django问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
AttributeError: 'str' object has no attribute 'decode'
錯誤代碼:query = query.encode(errors='replace')
解決方法:把decode改為encode即可。
轉載于:https://www.cnblogs.com/alex3174/p/11479490.html
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的AttributeError: 'str' object has no attribute 'decode' django问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PyTorch : torch.nn.x
- 下一篇: HZOJ 赤(CF739E Gosha