我正面临错误消息
TypeError: not enough arguments for format string
这是我的代码
for data in zip(link_hash, link, headline, snippit, rubID, date, time):
pass
if not sql_one_empty:
sql_insert_hash = """ INSERT INTO ntv (link_hash, link, headline, snippit, rubID, date, time) VALUES (%s, %s, %s, %s, %s, %s, %s)"""
cur.executemany(sql_insert_hash, data)
else:
pass
完整的错误回溯:
Traceback (most recent call last):
File "/home/unixben/Development/python/mySQL_save.py", line 45, in <module>
cur.executemany(sql_insert_hash, data)
File "/usr/local/lib/python3.5/dist-packages/pymysql/cursors.py", line 193, in executemany
self._get_db().encoding)
File "/usr/local/lib/python3.5/dist-packages/pymysql/cursors.py", line 209, in _do_execute_many
v = values % escape(next(args), conn)
TypeError: not enough arguments for format string
有人有任何信息吗?