--- a/src/eric7/EricWidgets/EricSpellCheckedTextEdit.py Fri Dec 09 17:07:18 2022 +0100 +++ b/src/eric7/EricWidgets/EricSpellCheckedTextEdit.py Sat Dec 10 11:11:08 2022 +0100 @@ -546,10 +546,11 @@ # Build a list of all misspelled words and highlight them misspellings = [] - for (word, pos) in self.__tokenizer(text): - if not self.__spellDict.check(word): - self.setFormat(pos, len(word), EnchantHighlighter.ErrorFormat) - misspellings.append((pos, pos + len(word))) + with contextlib.suppress(enchant.errors.Error): + for (word, pos) in self.__tokenizer(text): + if not self.__spellDict.check(word): + self.setFormat(pos, len(word), EnchantHighlighter.ErrorFormat) + misspellings.append((pos, pos + len(word))) # Store the list so the context menu can reuse this tokenization # pass (Block-relative values so editing other blocks won't