[Tutor] sqlite3 woes opening Moz, FFox sqlite db with only the inevitable 'DatabaseError: file is encrypted or is not a database' occurring...

Peter Otten __peter__ at web.de
Wed Jul 24 11:03:33 CEST 2013


Walter Prins wrote:

> Hi Peter,
> 
> 
> On 24 July 2013 09:20, Peter Otten <__peter__ at web.de> wrote:
> 
>> If you don't want to switch to Python 3.3 -- or if it doesn't feature an
>> sqlite version that supports WAL -- you could use sqlite's commandline
>> tools
>> to switch off WAL on a copy (!) of places.sqlite.
> 
> 
> I've just gone through similar steps as you and similarly determined that
> the reason for Paul's trouble is the version of sqlite3.dll included with
> the latest version of Python 2.7 doesn't support Firefox's DB.
> 
> I'd like to add that an alternative solution to switching Python versions
> is to simply replace (rename the original first) sqlite3.dll in
> "c:\Python27\DLLs" with the latest on the SQLite site.  I've just tested
> it and it works fine for my install of Python 2.7.2.5 32-bit with
> Firefox's
> places.sqlite after the update.  The dll can be downloaded here under
> "Precompiled binaries for Windows":
> http://www.sqlite.org/download.html

That's indeed less roundabout. I had no idea you could update Python's 
sqlite version on windows without a C compiler...




More information about the Tutor mailing list