View Single Post
Old 02-21-2011, 03:06 PM   #15
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Quote:
Originally Posted by BakerBug View Post
I seem to have broken this plugin.

Here are the steps that caused the problem.
1. Load a PDF into Calibre.
2. Convert the PDF to Mobi.
3. Add the Mobi to the Book Sync List.
4. Remove the PDF from Calibre. (Ops.. this removes the Mobi book too).
5. Look at the Book Sync list.

Then you get:
TypeError: 'NoneType' object is not subscriptable

I've tried uninstalling the plugin and reinstalling. It's still broke. Is there any way to delete the sync list (there were two other books on the list before I hosed things up)? I suspect that the list is corrupt since it contains an entry to a book that I removed from Calibre. When I re-added the book, Book Sync was still broke.
Ok, there are two things going on here.

There is clearly a "bug" in Book Sync when displaying the contents of the list. I'll post a new version in a few minutes so that any time you try to view the list it checks each id is still valid and removes any that are not, as is the case when you have deleted the record.

I had assumed integrity of that list when deletes occur but clearly there is not. I suspect that if you were to connect your device now, any faulty ids would be flushed out and you should no longer have a problem. This exact same "flaw" would occur for creating and then deleting news, but because there is no way to display the list of pending news items without this plugin you are not able to see invalid items in your list.
kiwidude is offline