Django使用ORM遇到的問題
阿新 • • 發佈:2019-05-10
att 技術分享 fig enc properly program bsp programs ase
問題1;mysqlclient 1.3.13 or newer is required; you have 0.9.3.
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
解決方法:
1)進入D:\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\base.py註釋35-36兩行
問題2;AttributeError: ‘str‘ object has no attribute ‘decode‘
AttributeError: ‘str‘ object has no attribute ‘decode‘
解決方法:
1)進入D:\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\operations.py
修改146行,把decode修改為encode
Django使用ORM遇到的問題