id为啥没有设置
我这报错了
Wikipedia <---------> https://en.wikipedia.org/wiki/Wikipedia
Traceback (most recent call last):
File "E:\Demo\Python\Python35\urllib\wikipedia2mysql.py", line 37, in <module>
cursor.execute(sql,(url.get_text(),"https://en.wikipedia.org"+url["href"]))
File "D:\Python35\lib\site-packages\pymysql\cursors.py", line 166, in execute
result = self._query(query)
File "D:\Python35\lib\site-packages\pymysql\cursors.py", line 322, in _query
conn.query(q)
File "D:\Python35\lib\site-packages\pymysql\connections.py", line 835, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "D:\Python35\lib\site-packages\pymysql\connections.py", line 1019, in _read_query_result
result.read()
File "D:\Python35\lib\site-packages\pymysql\connections.py", line 1302, in read
first_packet = self.connection._read_packet()
File "D:\Python35\lib\site-packages\pymysql\connections.py", line 981, in _read_packet
packet.check_error()
File "D:\Python35\lib\site-packages\pymysql\connections.py", line 393, in check_error
err.raise_mysql_exception(self._data)
File "D:\Python35\lib\site-packages\pymysql\err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1364, "Field 'id' doesn't have a default value")