anonymous // 2024-11-20 19:43:35 :
I tried the v2.2 under Linux and Windows, none of them work anymore.
In Windows, I get the following error:
Running grammalecte failed with message: Error: Command failed: "C:\Program Files\Python312\python.exe" C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2/grammalecte-cli.py --only_when_errors --with_spell_sugg --json --file d:\Git\IoT\Mk2PVRouter\content\common\alim-3_3.inc.rst
Traceback (most recent call last):
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2/grammalecte-cli.py", line 382, in <module>
main()
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2/grammalecte-cli.py", line 224, in main
sText = oGrammarChecker.getParagraphErrorsAsJSON(i, sText, bContext=xArgs.context, bEmptyIfNoErrors=xArgs.only_when_errors, \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\grammar_checker.py", line 70, in getParagraphErrorsAsJSON
aGrammErrs, aSpellErrs = self.getParagraphErrors(sText, dOptions, bContext, bSpellSugg, bDebug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\grammar_checker.py", line 55, in getParagraphErrors
aSpellErrs = self.oSpellChecker.parseParagraph(sText, bSpellSugg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\graphspell\spellchecker.py", line 190, in parseParagraph
for lSugg in self.suggest(dToken['sValue']):
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\graphspell\spellchecker.py", line 295, in suggest
lSuggs = self.oMainDic.suggest(sWord, nSuggLimit, True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\graphspell\ibdawg.py", line 232, in suggest
self._splitTrailingNumbers(oSuggResult, sWord)
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\graphspell\ibdawg.py", line 245, in _splitTrailingNumbers
oSuggResult.addSugg(m.group(1) + "�" + st.numbersToExponent(m.group(2)))
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\graphspell\ibdawg.py", line 63, in addSugg
st.showDistance(self.sSimplifiedWord, st.simplifyWord(sSugg))
File "C:\Users\metrichf\Downloads\Grammalecte-fr-v2.2\grammalecte\graphspell\str_transform.py", line 262, in showDistance
print(s1, "\u2260", s2, "\tDL:", nDL, "\tS4:", nS4, "\tJW:", fJW)
File "C:\Program Files\Python312\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u2260' in position 0: character maps to <undefined>
|