I'm working today on the creating a python program to reorganize my Firefox bookmarks. My previous post was about the PowerShell code I created to do this and since I haven't touched Python in a little bit, I figured what better way to relearn python than to write a program that requires database interaction.
While I am still working on this program I had an interesting error that drove me bonkers for 20 minutes or so. Unfortunately, I had actually found the answer within one or two google search results...but I didn't believe it could be that simple and kept searching.
The error I received when using a SELECT statement just to test the db connection:
sqlite3.DatabaseError: file is encrypted or is not a database
The FIX was very simple, and found at: https://deshmukhsuraj.wordpress.com/2015/02/07/windows-python-users-update-your-sqlite3/
The short of it is:
- Download the proper file for your architecture from: http://www.sqlite.org/download.html
- Unblock and Unzip
- Copy the sqlite3.dll from the unzipped directory into your C:\python27\DLLs
I made a backup copy of the original sqlite3.dll in the folder. However, without any restarting or reloading of my dev tool, it worked as advertised.