AttributeError: 'str' object has no attribute 'decode' django问题

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

错误代码:query = query.encode(errors='replace')
解决方法:把decode改为encode即可。

posted @ 2019-09-07 10:42  小人物哎  阅读(2143)  评论(0编辑  收藏  举报