且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

django 2中的迁移错误;AttributeError:'str'对象没有属性'decode'

更新时间:2023-12-02 23:09:52

转到django文件夹,然后转到以下路径:

Go to django folder, then go to this path:

django\db\backends\mysql

然后转到 operations.py 并找到 query = query.decode(errors ='replace').删除该行,然后放入 query = errors ='replace'

then go to operations.py and find query = query.decode(errors='replace'). Remove the line and put query = errors='replace'