I believe the issue is with cur.executemany(sql, flight_obs). The docs say:
executemany(sql, vars_list)
Execute a database operation (query or command) against all parameter tuples or mappings found in the sequence vars_list.
so it's effectively doing the equivalent of:
for i in flight_obs:
cur.execute(sql, i)
Since flight_obs is a list of strings, not tuples/mappings, you end up with something like:
cur.execute(sql, '2016-07-01 16:42:21')
cur.execute(sql, 'A319')
cur.execute(sql, 'EDDB')
Simple fix - just replace cur.executemany with cur.execute and it should all work.
I believe the issue is with cur.executemany(sql, flight_obs). The docs say:
executemany(sql, vars_list)
Execute a database operation (query or command) against all parameter tuples or mappings found in the sequence vars_list.
so it's effectively doing the equivalent of:
for i in flight_obs:
cur.execute(sql, i)
Since flight_obs is a list of strings, not tuples/mappings, you end up with something like:
cur.execute(sql, '2016-07-01 16:42:21')
cur.execute(sql, 'A319')
cur.execute(sql, 'EDDB')
Simple fix - just replace cur.executemany with cur.execute and it should all work.
I believe the issue is with cur.executemany(sql, flight_obs). The docs say:
executemany(sql, vars_list)
Execute a database operation (query or command) against all parameter tuples or mappings found in the sequence vars_list.
so it's effectively doing the equivalent of:
for i in flight_obs:
cur.execute(sql, i)
Since flight_obs is a list of strings, not tuples/mappings, you end up with something like:
cur.execute(sql, '2016-07-01 16:42:21')
cur.execute(sql, 'A319')
cur.execute(sql, 'EDDB')
Simple fix - just replace cur.executemany with cur.execute and it should all work.
I believe the issue is with cur.executemany(sql, flight_obs). theThe docs say:
executemany(sql, vars_list)
Execute a database operation (query or command) against all parameter tuples or mappings found in the sequence vars_list.
This implies that vars_list is a list of tuples of mappings, and that for each one, cur.execute will be called -so it's effectively doing the equivalent of:
for i in flight_obs:
cur.execute(sql, i)
Since `flight_obsflight_obs is a list of strings, not tuples/mappingmappings, you end up with something like:
cur.execute(sql, '2016-07-01 16:42:21')
cur.execute(sql, 'A319')
cur.execute(sql, 'EDDB')
Simple fix - just replace cur.executemany with cur.execute and it should all work.
I believe the issue is with cur.executemany(sql, flight_obs). the docs say:
executemany(sql, vars_list)
Execute a database operation (query or command) against all parameter tuples or mappings found in the sequence vars_list.
This implies that vars_list is a list of tuples of mappings, and that for each one, cur.execute will be called - effectively doing the equivalent of:
for i in flight_obs:
cur.execute(sql, i)
Since `flight_obs is a list of strings, not tuples/mapping, you end up with something like:
cur.execute(sql, '2016-07-01 16:42:21')
cur.execute(sql, 'A319')
cur.execute(sql, 'EDDB')
Simple fix - just replace cur.executemany with cur.execute and it should all work.
I believe the issue is with cur.executemany(sql, flight_obs). The docs say:
executemany(sql, vars_list)
Execute a database operation (query or command) against all parameter tuples or mappings found in the sequence vars_list.
so it's effectively doing the equivalent of:
for i in flight_obs:
cur.execute(sql, i)
Since flight_obs is a list of strings, not tuples/mappings, you end up with something like:
cur.execute(sql, '2016-07-01 16:42:21')
cur.execute(sql, 'A319')
cur.execute(sql, 'EDDB')
Simple fix - just replace cur.executemany with cur.execute and it should all work.
I believe the issue is with cur.executemany(sql, flight_obs). the docs say:
executemany(sql, vars_list)
Execute a database operation (query or command) against all parameter tuples or mappings found in the sequence vars_list.
This implies that vars_list is a list of tuples of mappings, and that for each one, cur.execute will be called - effectively doing the equivalent of:
for i in flight_obs:
cur.execute(sql, i)
Since `flight_obs is a list of strings, not tuples/mapping, you end up with something like:
cur.execute(sql, '2016-07-01 16:42:21')
cur.execute(sql, 'A319')
cur.execute(sql, 'EDDB')
Simple fix - just replace cur.executemany with cur.execute and it should all work.