2019年5月9日

Django2.2报错 AttributeError: 'str' object has no attribute 'decode'

摘要: 准备将 Django 连接到 MySQL,在命令行输入命令 后报错: 出现这个错误之后可以根据错误提示找到文件位置,打开 operations.py 文件,找到以下代码: 根据错误信息提示,说明 if 语句执行时出错, query 是 str 类型,而 是用来将 bytes 转换成 string 类 阅读全文

posted @ 2019-05-09 14:18 doubtful 阅读(6186) 评论(1) 推荐(0) 编辑

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

摘要: 准备将 Django 连接到 MySQL,在命令行输入命令 后报错: 由于 mysqlclient 目前不支持高版本python,出现这个错误之后可以根据错误提示找到文件位置,打开 base.py 文件,找到以下代码: py version = Database.version_info if ve 阅读全文

posted @ 2019-05-09 14:08 doubtful 阅读(6065) 评论(1) 推荐(0) 编辑

导航