Traceback (most recent call last):
File “D:/django_restful/api/mysql_action.py”, line 49, in
db.insert(‘api_user’, user_data)
File “D:/django_restful/api/mysql_action.py”, line 39, in insert
cursor.execute(insert_sql)
File “C:\python3.5\lib\site-packages\pymysql\cursors.py”, line 170, in execute
result = self._query(query)
File “C:\python3.5\lib\site-packages\pymysql\cursors.py”, line 328, in _query
conn.query(q)
File “C:\python3.5\lib\site-packages\pymysql\connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “C:\python3.5\lib\site-packages\pymysql\connections.py”, line 732, in _read_query_result
result.read()
File “C:\python3.5\lib\site-package
在封装初始化数据出现了报错
最新推荐文章于 2024-05-28 10:27:11 发布
在尝试用Python的pymysql库插入数据到'Django Restful'项目的'api_user'表中时,遇到InternalError,错误信息提示'groups'字段没有默认值。经过排查,问题已自行解决。
摘要由CSDN通过智能技术生成