Platform: Firefox 3.6.13, Python 2.7 stackless, and Windows 7 (not yet tested on Ubuntu, I will...)
I tried with the apsw library:
conn = apsw.Connection( dir + profile + '/places.sqlite', apsw.SQLITE_OPEN_READONLY )
And I got the error:
File "c:\apsw\src\statementcache.c", line 386, in sqlite3_prepare apsw.BusyError: BusyError: database is locked
I see "SQLite manager" can open the database also with Firefox running.
I just want to open and read, I think a trouble free operation. And I cannot use "SQLite manager". I need to code my Python (or PHP or Perl) script.
1) Which type of lock does Firefox use on the SQLite file? Why?
2) How does "SQLite manager" work?
Q2) SQLite Manager works in JavaScript, inside Firefox, so it can access the database.
This is not what I am looking for: An external application reading places while Firefox is running.
I am not sure about the lock type Firefox uses, but I'd recommend this:
Copy the Firefox database file to a different temporary location and read it from there (this also lowers the risk of accidentally damaging the original file).
I haven't had problems with this method yet on Firefox 3.*.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With