View Single Post
Old 02-27-2011, 04:06 AM   #7
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
I can't duplicate the exact scenario I described - but I may have found what happened. I think it might be a case issue.

In add_category gui2/dialogs/tag_categories.py you do a strcmp to see if the category already exists - but you don't ignore case like you do elsewhere (when reading in the db/appending a #, etc.) although the error message you generate says case may be the reason it exists. So the category is added to your internal list, but later on Calibre generates an unhandled exception ValueError: Attempt to add duplicate search term "@catc". So the item doesn't show in the tag browser, but is still available from the db.

I tested with a long name so perhaps I mistyped it and didn't notice the warning, etc. Right now I can add/delete and my plugin sees the changes fine except for the case issue above.
meme is offline   Reply With Quote