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

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

 

报错:

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

 

 

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

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


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

相关文章:

  • 2021-08-24
  • 2021-06-28
  • 2022-03-01
  • 2021-11-03
  • 2021-06-16
  • 2021-10-24
  • 2021-12-24
  • 2022-12-23
猜你喜欢
  • 2021-12-30
  • 2021-12-17
  • 2022-12-23
  • 2021-12-04
  • 2021-07-30
相关资源
相似解决方案