title: How to Insert tuple in postgres using [Insert into...select] statement, Not [Insert into...vales] method
body: <p>I am knew to this and am trying to insert data into this postgres table as follows in python:</p>
  
  <pre><code>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'])
  </code></pre>
  
  <p>..Yet I keep on getting this error:</p>
  
  <p>TypeError: not all arguments converted during string formatting</p>
  
  <p>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!</p>