Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-08-2014, 12:43 PM   #1
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
KoboUtilities Plugin: Database backup failure

First, my thanks to David Forrester for his outstanding plugin.

I setup the plugin to backup the database upon connection and it worked but only twice. Recently, when connecting my Aura HD to Calibre the error below appears. What might be causing this? And are any subsequent manual backups good or corrupt?

Thank you.

Edit: I am also experiencing the same result with my Mini


calibre, version 1.34.0 (win32, isfrozen: True)
Failed to backup device database: Failed: Backing up Kobo device database

Backing up Kobo device database
Python function terminated unexpectedly

rowid 739 missing from index sqlite_autoindex_ShelfContent_1
wrong # of entries in index sqlite_autoindex_ShelfContent_1 (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 195, in main
File "site-packages\calibre\utils\ipc\worker.py", line 139, in arbitrary_n
File "calibre_plugins.koboutilities.jobs", line 173, in do_device_database_backup
Exception:
rowid 739 missing from index sqlite_autoindex_ShelfContent_1
wrong # of entries in index sqlite_autoindex_ShelfContent_1

Last edited by Skydog; 05-08-2014 at 01:11 PM.
Skydog is offline   Reply With Quote
Old 05-08-2014, 02:50 PM   #2
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: 45,439
Karma: 168808777
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Skydog View Post
First, my thanks to David Forrester for his outstanding plugin.

I setup the plugin to backup the database upon connection and it worked but only twice. Recently, when connecting my Aura HD to Calibre the error below appears. What might be causing this? And are any subsequent manual backups good or corrupt?

Thank you.

Edit: I am also experiencing the same result with my Mini


calibre, version 1.34.0 (win32, isfrozen: True)
Failed to backup device database: Failed: Backing up Kobo device database

Backing up Kobo device database
Python function terminated unexpectedly

rowid 739 missing from index sqlite_autoindex_ShelfContent_1
wrong # of entries in index sqlite_autoindex_ShelfContent_1 (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 195, in main
File "site-packages\calibre\utils\ipc\worker.py", line 139, in arbitrary_n
File "calibre_plugins.koboutilities.jobs", line 173, in do_device_database_backup
Exception:
rowid 739 missing from index sqlite_autoindex_ShelfContent_1
wrong # of entries in index sqlite_autoindex_ShelfContent_1
At a wild eyed guess, your database has been corrupted.

When you run the "check device database" option, what does it return?

You might want to check the Kobo Utilities thread in the Calibre/GUI Plugins area;

Here's a link near the end of the thread where some database issues were being discussed: https://www.mobileread.com/forums/sho...&postcount=496

In theory, you can repair some corruption in an SQLite database but it is often easier and faster to recreate the database. For a Kobo ereader, logging out of your account is one way of doing a database rebuild. You will lose quite a bit of information such as reading position.

Last edited by DNSB; 05-08-2014 at 02:59 PM.
DNSB is offline   Reply With Quote
Advert
Old 05-08-2014, 03:11 PM   #3
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Thank you. I should have mentioned that I did indeed perform a database check on both the Aura HD and Mini. Both resulted ok as shown below:

Result of running 'PRAGMA integrity_check' on database on the Kobo device:


ok


I only side load epubs and never turn on the wifi.
Skydog is offline   Reply With Quote
Old 05-08-2014, 04:02 PM   #4
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.
 
Posts: 13,381
Karma: 78877538
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I get the feeling David might like to see this database to try to understand what might have happened to it; especially since the integrity check seems to work while the backup fails.
PeterT is offline   Reply With Quote
Old 05-08-2014, 05:12 PM   #5
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.
 
Posts: 13,381
Karma: 78877538
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I also wonder if issuing a sqlite "reindex" command to force a recreation of all the indices would help.
PeterT is offline   Reply With Quote
Advert
Old 05-08-2014, 08:02 PM   #6
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
If the backup shows as corrupt but the database on the device doesn't, it is probably a timing issue. The way the backup job is run at the moment it could run at the same time as one of the device jobs. As the error is in an index for the ShelfContent table, the copy was probably done while shelf management was being done.

I have seen this a couple of time and it has been reported by at least one other. I have been testing a version of the plugin that runs the jobs as device jobs. That prevents this problem. I'll be releasing this today or tomorrow.
davidfor is offline   Reply With Quote
Old 05-08-2014, 09:34 PM   #7
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Ah, that makes sense even to me. The only job running at the time was the updating of my "finished" shelf as I have a custom column created for books reaching 100% read.

Thank you very much, davidfor.



Quote:
Originally Posted by davidfor View Post
If the backup shows as corrupt but the database on the device doesn't, it is probably a timing issue. The way the backup job is run at the moment it could run at the same time as one of the device jobs. As the error is in an index for the ShelfContent table, the copy was probably done while shelf management was being done.

I have seen this a couple of time and it has been reported by at least one other. I have been testing a version of the plugin that runs the jobs as device jobs. That prevents this problem. I'll be releasing this today or tomorrow.
Skydog is offline   Reply With Quote
Old 05-10-2014, 04:10 AM   #8
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
Update to Kobo Utilities plugin - V1.6.6

I have just released the fix for this. See https://www.mobileread.com/forums/showthread.php?p=2827309 for details.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync failure, Database repair, missing books laird Library Management 3 08-24-2012 04:47 AM
Database Failure RichardGH Library Management 9 07-25-2012 05:59 AM
Serious firmware or database failure in Kobo Wireless - help! tigeraid Kobo Reader 5 09-27-2011 10:13 PM
All books and db lost in drive failure, how to restore from backup? stustaff Calibre 2 10-31-2010 06:29 AM
Update Metadata in database from Plugin DokaMax Plugins 0 05-22-2010 05:58 AM


All times are GMT -4. The time now is 07:18 AM.


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