当使用django框架,运行python manage.py makemigrations命令时,报错说:AttributeError: ‘str’ object has no attribute ‘decode’
如圈①所示:
Django+MySQL+python报错:AttributeError: ‘str‘ object has no attribute ‘decode‘
这是我们看一下圈②所说的问题,按他所说的,找到python安装目录下的django文件夹下的operations.py,即按照问题中的圈②所示的路径找到operations.py文件,打开后,将146行的decode修改成encode
问题就解决啦!!!
Django+MySQL+python报错:AttributeError: ‘str‘ object has no attribute ‘decode‘
Django+MySQL+python报错:AttributeError: ‘str‘ object has no attribute ‘decode‘

相关文章:

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