title: Python sqlite3 "unable to open database file" on windows
body: <p>I am working on a windows vista machine in python 3.1.1.  I am trying to insert a large number of rows into a SQLite3 db.  The file exists, and my program properly inserts <em>some</em> rows into the db.  However, at some point in the insertion process, the program dies with this message:
      sqlite3.OperationalError: unable to open database file</p>
  
  <p>However, before it dies, there are several rows that are properly added to the database.</p>
  
  <p>Here is the code which specifically handles the insertion:</p>
  
  <pre><code>idx = 0
  lst_to_ins = []
  for addl_img in all_jpegs:
      lst_to_ins.append((addl_img['col1'], addl_img['col2']))
      idx = idx + 1
      if idx % 10 == 0:
          logging.debug('adding rows [%s]', lst_to_ins)
          conn.executemany(ins_sql, lst_to_ins)
          conn.commit()
          lst_to_ins = []
          logging.debug('added 10 rows [%d]', idx)
  if len(lst_to_ins) &gt; 0:
      conn.executemany(ins_sql, lst_to_ins)
      conn.commit()
      logging.debug('adding the last few rows to the db')
  </code></pre>
  
  <p>This code inserts anywhere from 10 to 400 rows, then dies with the error message </p>
  
  <pre><code>conn.executemany(ins_sql, lst_to_ins)
  sqlite3.OperationalError: unable to open database file
  </code></pre>
  
  <p>How is it possible that I can insert some rows, but then get this error?</p>