View Single Post
Old 01-09-2024, 04:52 PM   #2838
Steven Karp
Enthusiast
Steven Karp began at the beginning.
 
Posts: 38
Karma: 10
Join Date: May 2014
Device: Windows 10 Tablet / Calibre or Nexus 9 / Moon+
I'm having a weird problem with the database backup function.

Currently Calibre 7.3 on an M2 MacBook Air running Sonoma 14.2.1, but this has been going on for quite a while--since late in the Ventura lifecycle, if memory serves.

When I attempt a backup of the database via the Kobo Utilities (at device connection, natch), I get this error:

Code:
calibre, version 7.3.0 (darwin, embedded-python: True)
Failed to backup device database: Failed: Backing up Kobo device database

CantOpenError: unable to open database file

Traceback (most recent call last):
  File "calibre/gui2/device.py", line 104, in run
  File "calibre_plugins.koboutilities.jobs", line 215, in do_device_database_backup
    check_result = check_device_database(backup_file_path)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.koboutilities.action", line 6102, in check_device_database
    cursor.execute(check_query)
  File "src/cursor.c", line 1088, in APSWCursor_execute.sqlite3_prepare_v3
apsw.CantOpenError: CantOpenError: unable to open database file
However, if I manually select Database-->Check the device database, it thinks for a couple of minutes and then reports it to be okay.

All database updates work fine (reading position, adding books, updating series and other metadata, etc.)

Similarly, if I plug the reader into my Windows machine, Kobo Utilities backs up the database without a complaint.

Possibly relevant: Sonoma, as best I can tell, no longer has the "Removable Volumes" permission (the Kobo desktop utility always complains about not having that access). I *have* given Calibre "Full Disk Access" permission.

Other, random, thought: is it possible there's a case sensitivity issue here? FWIW, the on-device file is named "KoboReader.sqlite".
Steven Karp is offline