报错一:

django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.

解决方法:编辑文件,注释掉如下行:

version = Database.version_info
# if version < (1, 3, 13):
#     raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)

 

报错二:

File "D:\data\gitee.com\ExamOnline\venv\lib\site-packages\django\db\backends\mysql\operations.py", line 146, in last_executed_query query = query.decode(errors='replace') AttributeError: 'str' object has no attribute 'decode'

解决方法:

编辑文件operations.py,注释掉如下行

query = getattr(cursor, '_executed', None)
# if query is not None:
# query = query.decode(errors='replace')
return query

 

相关文章:

  • 2021-05-31
  • 2022-12-23
  • 2021-06-09
  • 2021-12-14
  • 2021-07-04
  • 2022-12-23
  • 2021-09-03
  • 2021-05-06
猜你喜欢
  • 2021-10-13
  • 2021-04-03
  • 2021-11-21
  • 2022-01-01
  • 2021-06-22
  • 2021-08-27
  • 2022-02-02
相关资源
相似解决方案