title: TypeError: 'psycopg2._psycopg.Binary' object does not support indexing
body: <p>I need your help, I'm trying to insert files (.txt) to postgres using psycopg2 with python, but sends this error and don't understand...</p>
  
  <p>error: </p>
  
  <pre><code>TypeError: 'psycopg2._psycopg.Binary' object does not support indexing
  </code></pre>
  
  <p>I have:</p>
  
  <pre><code>archivo=open("coordenada.out",'rb').read()
  
  cur.execute("insert into fhi(coordenadas) values(%s)",(psycopg2.Binary(archivo)))
  </code></pre>