Mobileread
Clara database disk image error
#1  retro 10-22-2020, 05:02 PM
The problem I'm having with my Clara started a few months ago and despite all my efforts it keeps coming back.
My Clara was working fine for several months but sometime after the update earlier this summer it started having problems.
I added a few new books from Calibre and the covers did not load. Connecting repeatedly didn't make a difference, but when I used the Kobo Utility to force the covers, they showed up. This went on for a week or so until one day I finished a book and selected remove. It did not delete. I tried a couple of more books that would not delete either. When I connected to Calibre version 4.23.0, this message popped up.

ERROR: Error: Error communicating with device

CorruptError: database disk image is malformed

Traceback (most recent call last):
File "site-packages\calibre\gui2\device.py", line 90, in run
File "site-packages\calibre\gui2\device.py", line 513, in _books
File "site-packages\calibre\devices\kobo\driver.py", line 1981, in books
File "site-packages\calibre\devices\kobo\driver.py", line 1852, in get_bookshelvesforbook
File "c:\t\t\apsw-47cp24d7\src\cursor.c", line 236, in resetcursor
CorruptError: CorruptError: database disk image is malformed

I did a factory reset, let it upgrade, applied patches and all was well. A few weeks later I started having issues with covers not loading again.

Since I had upgraded to 32gb micro sd, I installed the original image to a new micro sd, let it upgrade to the latest version, applied patches and all was well.

Earlier this week, covers quit loading and today when I connected to Calibre (still on 4.23 - KoboTouchextended driver) I got the database error again.

Since I've had this happen with 2 different sd cards, they should't be the problem.

Maybe I've done something squirrelly with the patching without knowing??

Any ideas would be appreciated.
Thanks!
Reply 

#2  geek1011 10-22-2020, 05:44 PM
How do you connect/disconnect the device? Do books open correctly? Do you ever have errors when copying books to the device directly? Also, do you have Plato, KOReader, KSM, or vlavsovsoft installed?
Reply 

#3  retro 10-22-2020, 06:11 PM
Quote geek1011
How do you connect/disconnect the device? Do books open correctly? Do you ever have errors when copying books to the device directly? Also, do you have Plato, KOReader, KSM, or vlavsovsoft installed?
I connect with a usb cable and always disconnect device with calibre before unplugging.
Even when I get the database error, I can add books to the device without errors.
No Plato, KOReader, KSM, or vlavsovsoft.
Miniclock is installed and about 12 patches.
Reply 

#4  geek1011 10-22-2020, 07:43 PM
That's odd. If you open the database in an external editor (e.g. sqlitebrowser or the sqlite3 cli) and run "PRAGMA integrity_check;", what does it say?
Reply 

#5  retro 10-22-2020, 08:30 PM
Quote geek1011
That's odd. If you open the database in an external editor (e.g. sqlitebrowser or the sqlite3 cli) and run "PRAGMA integrity_check;", what does it say?

Execution finished without errors.
Result: 1 rows returned in 45ms
At line 1:
PRAGMA integrity_check;

I used sqlitebrowser, opened the KoboReader.sqlite, ran it in the sql window and again under tools. I guess that the right way.
Looks like it's ok, but calibre is still throwing the error.

Ok, I tried to open BookReader.sqlite and got 'database is malformed' and would not open.
Not sure what would cause that?
Reply 

#6  geek1011 10-22-2020, 09:04 PM
Quote retro
Execution finished without errors.
Result: 1 rows returned in 45ms
At line 1:
PRAGMA integrity_check;

I used sqlitebrowser, opened the KoboReader.sqlite, ran it in the sql window and again under tools. I guess that the right way.
Looks like it's ok, but calibre is still throwing the error.

Ok, I tried to open BookReader.sqlite and got 'database is malformed' and would not open.
Not sure what would cause that?
BookReader.sqlite is encrypted. Regarding the other database, I can't say much from here since I'm not familiar with Calibre. @davidfor might know more about that.
Reply 

#7  davidfor 10-22-2020, 10:03 PM
Quote retro
Execution finished without errors.
Result: 1 rows returned in 45ms
At line 1:
PRAGMA integrity_check;

I used sqlitebrowser, opened the KoboReader.sqlite, ran it in the sql window and again under tools. I guess that the right way.
Looks like it's ok, but calibre is still throwing the error.
Are you saying you ran the above and got the error from calibre in the same connection session? That shouldn't be possible. Do you have the Kobo Utilities plugin installed in calibre? If so, when you next see the above error in calibre, can you run the database check the plugin has? It is just running "PRAGMA integrity_check", but in the same context as the access from calibre.
Quote
Ok, I tried to open BookReader.sqlite and got 'database is malformed' and would not open.
Not sure what would cause that?
As @geek1011 said, this is encrypted and is not used for what you are looking at.
Reply 

#8  retro 10-23-2020, 08:57 AM
Quote davidfor
Are you saying you ran the above and got the error from calibre in the same connection session? That shouldn't be possible. Do you have the Kobo Utilities plugin installed in calibre? If so, when you next see the above error in calibre, can you run the database check the plugin has? It is just running "PRAGMA integrity_check", but in the same context as the access from calibre.
No, I did not have calibre open when I used SQLitedatabasebrowser. I have run this a number of times directly on the KoboReader.sqlite on the Kobo and still it shows no errors. The error pops up when I connect with calibre open. The Kobo Utilties plugin is installed and this is what the check reported.

calibre, version 4.23.0
ERROR: Unhandled exception: <b>CorruptError</b>:CorruptError: database disk image is malformed

calibre 4.23 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.18362-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.18362')
Python 2.7.16+
Windows: ('10', '10.0.18362', 'SP0', u'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 34, 0) && DeDRM (6, 8, 0) && Package KFX (from KFX Input) (1, 34, 0) && Find Duplicates (1, 7, 2) && KindleUnpack - The Plugin (0, 82, 2) && Kobo Utilities (2, 11, 5) && EpubMerge (2, 11, 0) && KFX metadata reader (from KFX Input) (1, 34, 0) && KFX Input (1, 34, 0) && Modify ePub (1, 4, 1) && Import List (1, 5, 1) && EpubSplit (2, 9, 0) && Manage Sony x50 Reader Book List (1, 2, 11) && Count Pages (1, 10, 0) && KoboTouchExtended (3, 4, 1) && Quality Check (1, 10, 1)
Traceback (most recent call last):
File "calibre_plugins.koboutilities.action", line 1605, in check_device_database
File "calibre_plugins.koboutilities.action", line 3440, in _check_device_database
File "calibre_plugins.koboutilities.action", line 4995, in check_device_database
File "c:\t\t\apsw-47cp24d7\src\cursor.c", line 236, in resetcursor
CorruptError: CorruptError: database disk image is malformed

Quote davidfor
As @geek1011 said, this is encrypted and is not used for what you are looking at.
I have a 2nd Clara and I copied the BookReader.sqlite from both readers to my computer and tried to open them in SQLitedatabasebrowser. The problem one would not open saying it was mal formed. But the copy from the 2nd Clara popped up a window asking for a password for the encryption.
Reply 

#9  davidfor 10-23-2020, 10:06 AM
Quote retro
No, I did not have calibre open when I used SQLitedatabasebrowser. I have run this a number of times directly on the KoboReader.sqlite on the Kobo and still it shows no errors.
No, I meant, did you run the check and calibre in the same session. You don't want to open the databases twice at the same time, but, if you connect, do the check and then run calibre, do you see the error? Or if you see the error in calibre, does the check work when you close calibre?
Quote
The error pops up when I connect with calibre open.
Do you mean this happens only if calibre is open when you connect the device? Does it happen if calibre is closed and you open it after the Windows notifies you the device is connected? If so, that has been reported before, but not for a long time. It suggests something is blocking access to the files on the device for a little while. An antivirus program is the obvious culprit, but it could be something else.
Quote
The Kobo Utilties plugin is installed and this is what the check reported.

calibre, version 4.23.0
ERROR: Unhandled exception: <b>CorruptError</b>:CorruptError: database disk image is malformed

calibre 4.23 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.18362-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.18362')
Python 2.7.16+
Windows: ('10', '10.0.18362', 'SP0', u'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 34, 0) && DeDRM (6, 8, 0) && Package KFX (from KFX Input) (1, 34, 0) && Find Duplicates (1, 7, 2) && KindleUnpack - The Plugin (0, 82, 2) && Kobo Utilities (2, 11, 5) && EpubMerge (2, 11, 0) && KFX metadata reader (from KFX Input) (1, 34, 0) && KFX Input (1, 34, 0) && Modify ePub (1, 4, 1) && Import List (1, 5, 1) && EpubSplit (2, 9, 0) && Manage Sony x50 Reader Book List (1, 2, 11) && Count Pages (1, 10, 0) && KoboTouchExtended (3, 4, 1) && Quality Check (1, 10, 1)
Traceback (most recent call last):
File "calibre_plugins.koboutilities.action", line 1605, in check_device_database
File "calibre_plugins.koboutilities.action", line 3440, in _check_device_database
File "calibre_plugins.koboutilities.action", line 4995, in check_device_database
File "c:\t\t\apsw-47cp24d7\src\cursor.c", line 236, in resetcursor
CorruptError: CorruptError: database disk image is malformed
Same basic error, so it is seems to be blocking this.
Quote
I have a 2nd Clara and I copied the BookReader.sqlite from both readers to my computer and tried to open them in SQLitedatabasebrowser. The problem one would not open saying it was mal formed. But the copy from the 2nd Clara popped up a window asking for a password for the encryption.
This database has nothing to do with it. The driver does not look at it at all. And as it is encrypted, we can't look at it.
Reply 

#10  retro 10-23-2020, 10:50 AM
Quote davidfor
No, I meant, did you run the check and calibre in the same session. You don't want to open the databases twice at the same time, but, if you connect, do the check and then run calibre, do you see the error? Or if you see the error in calibre, does the check work when you close calibre?
I have not run both at the same time.
Yes, I can do the check that says no errors then open calibre and get the error, close calibre, do the check and it says no errors.

Quote davidfor
Do you mean this happens only if calibre is open when you connect the device? Does it happen if calibre is closed and you open it after the Windows notifies you the device is connected? If so, that has been reported before, but not for a long time. It suggests something is blocking access to the files on the device for a little while. An antivirus program is the obvious culprit, but it could be something else.
I usually open calibre before connecting but trying both ways, I always get the error. I would think if something like antivirus was blocking, it would do it on both Claras. The 2nd one has no problems.


Quote davidfor
This database has nothing to do with it. The driver does not look at it at all. And as it is encrypted, we can't look at it.
Just seemed odd to me that one can be accessed and the other is said to be malformed.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register