View Single Post
Old 07-17-2021, 09:44 AM   #21
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Cootey View Post
Well, it didn't take me long. I've run into the corrupt database/deleted downloads issue again. Once the Elipsa is ejected from my Mac, it reimports ALL sideloaded books again, deletes all 242 purchased books, and resets the home screen. Repairing the account restores everything but the downloaded ebooks.

Setting my Elipsa up with Kobo Desktop worked fine.
Manually sideloading books by dragging and dropping in the Finder was fine.
Downloading through Overdrive was fine.
I ran into problems the moment I started to use Calibre to import books. Here's the error:

Code:
calibre, version 5.23.0
ERROR: Error: Error communicating with device

CorruptError: database disk image is malformed

Traceback (most recent call last):
  File "calibre/gui2/device.py", line 89, in run
  File "calibre/gui2/device.py", line 515, in _books
  File "calibre/devices/kobo/driver.py", line 1974, in books
apsw.CorruptError: CorruptError: database disk image is malformed
I could use some suggestions on how to troubleshoot and identify what is going wrong. I don't want to abandon Calibre and davidfor's plugin. They're too useful. Right now I'm trying to restore from a backup to a state where everything seemed to be working. If that doesn't work, I'll log out of my Elipsa, then log back in. Then factory reset as a last resort.
The problem is knowing when the database became corrupted. The error is at the start of the loop reading the database. It is probably happening on the first record, but, might be happening after reading some of the book records. And that probably means the database is already corrupted when calibre sees it.

Can you test the database before using calibre? Any SQLite database manager should be able to do it. They might have an option to do the check. But, there isn't, then run "PRAGMA integrity_check". You can try DB Browser for SQLite as that has a MAC version.

If the database is fine, run calibre in debug mode. That will let us see if it is breaking when the database is first opened, or after reading some records. You will need to start calibre with the command "calibre-debug -g" to do this.

You could also check the database before ejecting the device. This is to confirm that calibre did not do anything bad.

Other thoughts are:

Could it be the MAC? If you have another computer to try, it would be good to do soo.

Are you ever powering off?

Are there any log files being produced in the .kobo directory? I'm mainly wondering about stack dumps which will have the name "stack_xx.log" where xx is two numbers. If these exist, they are a sign of a crash happening somewhere.

Does the partition show as being dirty when you connect? I don't know if the MAC will show this. Windows would offer to check the partition if it is dirty.
davidfor is offline   Reply With Quote