Index: gc_core/py/text.py ================================================================== --- gc_core/py/text.py +++ gc_core/py/text.py @@ -56,11 +56,11 @@ def generateParagraph (sParagraph, aGrammErrs, aSpellErrs, nWidth=100): "Returns a text with readable errors" if not sParagraph: - return "" + return ("", []) lGrammErrs = sorted(aGrammErrs, key=lambda d: d["nStart"]) lSpellErrs = sorted(aSpellErrs, key=lambda d: d['nStart']) lErrors = sorted(lGrammErrs + lSpellErrs, key=lambda d: d["nStart"]) for n, dErr in enumerate(lErrors, 1): dErr["iError"] = n