Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 08-12-2022, 08:21 PM   #1
Seth H
Enthusiast
Seth H began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jan 2013
Location: Tasmania, Australia
Device: Kobo H2O
database disk image malformed

When trying to send books to my Kobo I get the following error.

calibre, version 6.3.0
ERROR: Error: Error communicating with device

CorruptError: database disk image is malformed

Traceback (most recent call last):
File "calibre/gui2/device.py", line 88, in run
File "calibre/gui2/device.py", line 540, in _books
File "calibre/devices/kobo/driver.py", line 1924, in books
File "calibre/devices/kobo/driver.py", line 3056, in get_bookshelflist
apsw.CorruptError: CorruptError: database disk image is malformed

Calibre recognises the Kobo but will not communicate. Any help would be much appreciated.

Since posting this I have found a post from 2015 that recommended signing out and in on the Kobo account. I have done this and the issue has been fixed.

Last edited by Seth H; 08-12-2022 at 08:45 PM. Reason: issue fixed
Seth H is offline   Reply With Quote
Old 08-12-2022, 11:20 PM   #2
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: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Unless you have a recent backup of the database, that is the best solution. The only other is to do a factory reset. Unfortunately, there are a few things that can corrupt the database. About the only one that is in our control is to make sure the device is safely ejected after connecting to a computer.

And, again unfortunately, you didn't have to go back to 2015 for that advice. The question is posted most months here and the Kobo forum.
davidfor is offline   Reply With Quote
Advert
Old 03-05-2024, 02:49 PM   #3
smiley1081
Member
smiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watch
 
Posts: 14
Karma: 10794
Join Date: Jan 2016
Location: Italy
Device: Kobo Glo HD
Quote:
Originally Posted by davidfor View Post
Unless you have a recent backup of the database, that is the best solution. The only other is to do a factory reset. Unfortunately, there are a few things that can corrupt the database. About the only one that is in our control is to make sure the device is safely ejected after connecting to a computer.
OK, I have to ask.

How does one backup the database?

And how does one RESTORE the database?

One tries to safely eject the Kobo, but it and the computer are not always forthcoming...

Please feel free to point me out to another thread...
smiley1081 is offline   Reply With Quote
Old 03-05-2024, 03:00 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,549
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Unfortunately, since @davidfor passed away last August, he will not be answering your questions.

Quote:
Originally Posted by smiley1081 View Post
OK, I have to ask.

How does one backup the database?
You use the KoboUtilities plugin to backup the database. The configuration is on the second tab of the plugin configuration dialog.

Quote:
Originally Posted by smiley1081 View Post
And how does one RESTORE the database?
You connect your Kobo to your computer. Browse to the directory on your computer where the database backups are stored (the default naming convention gives a filename such as KoboReader-KoboClaraHD-N24985011111-20240229-095905.zip), open the latest database backup file and copy the two .sqlite files to the .kobo directory on your Kobo. Safely eject and then restart (the restart is likely unnecessary but it's what I do).

Quote:
Originally Posted by smiley1081 View Post
One tries to safely eject the Kobo, but it and the computer are not always forthcoming...

Please feel free to point me out to another thread...
I reboot my Kobo before each connection. I was getting database errors and what I found when I looked at the .kobo directory was that either one or both of the database files had matching .sqlite-wal and .sqlite-shm files present which says the database was not properly closed (wal=write ahead logging and shm is shared memory).

Between the reboot before connecting and safely ejecting before disconnecting, I have not seen any database issues in the last 5 months with 4.38.21908 on my Sage which is my go to ereader.
DNSB is offline   Reply With Quote
Old 03-06-2024, 02:04 PM   #5
smiley1081
Member
smiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watchsmiley1081 is clearly one to watch
 
Posts: 14
Karma: 10794
Join Date: Jan 2016
Location: Italy
Device: Kobo Glo HD
Thanks!

Given the times one gets the "database disk image malformed" error this answer should probably be pinned.
smiley1081 is offline   Reply With Quote
Advert
Old 03-06-2024, 03:05 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,447
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by smiley1081 View Post
Thanks!

Given the times one gets the "database disk image malformed" error this answer should probably be pinned.
It should be rare.
Always connect WITH the HOME screen showing (never with a book open)
Always EJECT
WAIT before doing anything else with the device. It may not be instant before SAFE to eject
Then WAIT for the device to finish processing (happens when adding), again. It takes time for the Eject to be recognized, then the check for new to complete.
FINALLY, you can pull the plug

FWIW other than some bad Kobo FW, I have had this happen 1 time between my Aura2 and my Libra2. Both get LOTS of use.
theducks is offline   Reply With Quote
Old 08-01-2024, 04:50 PM   #7
breena31
Junior Member
breena31 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Kindle
database disk image is malformed

Hello,

I read through this thread, but didn't see anything that spoke to my particular issue. I am getting this error even though I have not connected any device to calibre to download books. I was just trying to delete a second copy of a book from my library and this error popped up. It keeps showing up every time I try to delete a book. Can anyone help?
breena31 is offline   Reply With Quote
Old 08-01-2024, 05:17 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,549
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Since you are not connecting any Kobo devices, this suggests that your calibre database is corrupted. You could try a database_restore using the calibredb command line option.

Run it once without the -r or --really-do-it option and if no errors, then run it again with the -r option.
DNSB is offline   Reply With Quote
Old 08-01-2024, 05:26 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,447
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Sign out of your device.
The sign it back in.

Malformed means DAMAGED. Every piece of data has a pattern that MUST match where it lands. Malformed may mean something like a Letter is trying to land in a location for Logical... A Mismatch.

It needs to rebuild itself. Data (reading position,,,) may be lost.
Common causes are disconnecting without ejecting AND WAITING for the OK, A power fail during transfer, Kitty on pulls on cable...
theducks is offline   Reply With Quote
Old 08-01-2024, 06:10 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,438
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
Sign out of your device.
The sign it back in.

Malformed means DAMAGED. Every piece of data has a pattern that MUST match where it lands. Malformed may mean something like a Letter is trying to land in a location for Logical... A Mismatch.

It needs to rebuild itself. Data (reading position,,,) may be lost.
Common causes are disconnecting without ejecting AND WAITING for the OK, A power fail during transfer, Kitty on pulls on cable...
Also, if the Kobo is not a color version or Clara BW, make sure the firmware is at 4.38.23038 as that fixes the left open files issue that some have experienced. When you use calibre with your Kobo, don't forget to properly eject your Kobo from the computer using calibre's eject.
JSWolf is offline   Reply With Quote
Old 08-01-2024, 08:53 PM   #11
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,754
Karma: 75000002
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Folks.. please read the original post; no device connected to calibre.

Sent from my Pixel 7a using Tapatalk
PeterT is offline   Reply With Quote
Old 08-03-2024, 11:28 PM   #12
breena31
Junior Member
breena31 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Kindle
Ok, thanks for your help everyone. I appreciate it.
breena31 is offline   Reply With Quote
Old 08-31-2024, 06:58 AM   #13
shored
Junior Member
shored began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara Colour, Cybook Muse
Quote:
Originally Posted by theducks View Post
It should be rare.
For what it's worth, if anything:

I've had my Clara Colour for a couple of months and just got this error after transferring some books, unmounting, and using NickleMenu to reconnect the USB.

Instead of restoring a database backup, I rebooted. I didn't see the error again after reconnecting the USB cable. KoboUtilities did its thing without complaining.

I transferred a few more books, unmounted, and reconnected. The error has not returned.

FW 4.39.23027
shored is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
database disk image is malformed fxp33 Calibre 10 09-03-2015 12:58 AM
database disk image is malformed bartveld Devices 5 01-27-2015 07:25 PM
Touch Database Disk Image Malformed TheArtfulDodger Kobo Reader 7 11-20-2014 02:22 PM
Database disk image is malformed alanpmcd Calibre 2 05-31-2012 05:12 PM
database disk image is malformed sirbruce Calibre 12 06-26-2009 10:06 PM


All times are GMT -4. The time now is 09:12 AM.


MobileRead.com is a privately owned, operated and funded community.