02-07-2023, 05:29 AM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2023
Device: Kindle Paperwhite
|
delete/update of rows in metadata.db always fails ;-(
HI everybody, I'm new here and this is my 1st post - hope I'm not OT with my question in this forum...
I'm using Calible a lot to organize my ebook and magazine libraries. Because the libs grew quite a bit in the past, I'm trying to find ways to clean-up duplicates from my libs. The find duplicates add-on works but it still leaves a lot behind. I'd like to find a different way and already exported all my books and the related metadata into a separate database. Here I identified a lot of books that I like to remove from one or the other Calibre lib, because they are already stored in another lib.... So, I thought, I can easily use PowerShell, open the Calibre SQLlite DB and to delete a row from the books table... That works fine, when I'm using SQLitebrowser (e.g. "DELETE FROM books WHERE id=1123") - but that always fails when trying this with PowerShell using the same query - here I always getan error: Invoke-SqliteQuery -DataSource $sDatabasePath -Query "DELETE FROM boo … | Exception calling "Fill" with "1" argument(s): "SQL logic error no such module: fts5"... Marking a certain book for deletion by trying to update the corresponding row in the Calibre DB ("Update books set title = 'deleted' WHERE id = 6764") actually fails in both - SQLbrowser and powershell: Exception calling "Fill" with "1" argument(s): "SQL logic error no such function: title_sort" I'm a bit frustrated and hope maybe someone here in this forum can shed some light on why I'm getting theses errors and why the same query works fine in SQLlitebrowser and fails in PowerShell ;-( All hints are appreciated ;-) Thanks a lot in advance. |
02-07-2023, 05:37 AM | #2 |
creator of calibre
Posts: 43,980
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Because whatever library powershell is using to access sqlite does not have the sqlite FTS5 extension enabled. And note that directly manipulating the calibre db like this will break things. The correct way to manipulate the db is using the API calibre provides for it. Either via the calibredb command or the actual calibre DB classes.
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Metadata update via Amazon fails after repeated uses | JustChris | Library Management | 1 | 08-12-2017 12:37 AM |
Cover/Image fails to delete | shoelesshunter | Amazon Kindle | 1 | 07-09-2016 08:20 AM |
Touch 2.0 update fails | Spheres | Kobo Reader | 12 | 07-12-2012 04:42 PM |
Getting metadata fails | shrik | Calibre | 3 | 12-24-2010 12:05 PM |
Firmware Update 2.5.2 Update fails | freezer2k | Amazon Kindle | 4 | 06-25-2010 07:38 PM |