From b51bb174db8c8551a31c1ed9b1840e2390af31f4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 25 Apr 2014 13:02:24 +0530 Subject: [PATCH] Ignore harmless error when importing words to the dictionary --- src/calibre/spell/dictionary.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/spell/dictionary.py b/src/calibre/spell/dictionary.py index a512653ee3..c0c891da27 100644 --- a/src/calibre/spell/dictionary.py +++ b/src/calibre/spell/dictionary.py @@ -255,7 +255,10 @@ class Dictionaries(object): ud.words.add((word, locale.langcode)) if len(ud.words) > wl: self.save_user_dictionaries() - self.word_cache.pop((word, locale), None) + try: + self.word_cache.pop((word, locale), None) + except TypeError: + pass # word is a set, ignore return True return False