DataError: unterminated CSV quoted field
<p>I'm trying to import a huge (~2 GB) csv file into postgres. Below is the query I wrote (in Python) to do this:</p>

<pre><code>q= ("COPY {db} from '{d}\\{file}' WITH (FORMAT CSV, NULL 'NULL', HEADER)
 ;").format(d = directory, db = db_name, file =fname)
</code></pre>

<p>Now somewhere on line <code>17632150</code>there is an <em>Integer</em> field that starts with a quotation, which is also not closed:</p>

<pre><code> "2195961,12855,628,No
</code></pre>

<p>I wonder what my options are at this point? My only constraint is that it should be possible to do this with <code>psycopg2</code>.</p>