django执行python manage.py makemigrations 时报错AttributeError: 'str' object has no attribute 'decode'

原文链接:https://blog.csdn.net/dakengbi/article/details/90046940

=================

 

报错:

 

 

解决方法:
1.用终端找到上面路径的文件


2.在文件中找到 query = query.decode(error = ‘replace’) 这句代码,然后将decode修改成encode就好了
3.在项目manage.py路劲下重新执行如下命令
python manage.py makemigrations
python manage.py migrate
————————————————
版权声明:本文为CSDN博主「慢慢的走」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/dakengbi/article/details/90046940

posted @ 2022-02-08 00:19  larybird  阅读(189)  评论(0编辑  收藏  举报