I am knew to this and am trying to insert data into this postgres table as follows in python:
cur.execute('''INSERT INTO trademarks_image_mark (trademarks_id, image_mark_id)
SELECT currval('trademarks_id_seq'), id FROM image_mark WHERE
image_file_name LIKE %s''', data['ImageFileName'])
..Yet I keep on getting this error:
TypeError: not all arguments converted during string formatting
Does anyone know why this might be happening? I know how to insert tuples like (%s) with regular Insert into...values statements, but not in this format. Much appreciated and thanks!