language_tool_python
language_tool_python copied to clipboard
JSON-Decode-Error
Since a few days i get this Error:
- requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- language_tool_python.utils.LanguageToolError: Error: Internal Error: java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence
@LeonHammerla - can you provide more details? What version, what command are you running, etc.?
I just installed the package on a fresh VM through Google Colab and it seemed to work fine (link).
my usage:
config = {'cacheSize': 5000,
'pipelineCaching': True,
'maxCheckThreads': multiprocessing.cpu_count()}
config['fasttextBinary'] = os.path.join(ROOT_DIR, "data", "fasttext", "cc.de.300.bin")
grammar_tool = language_tool_python.LanguageTool("de-DE",
config=config)
grammar_tool.disabled_rules = ['COMMA_PARENTHESIS_WHITESPACE']
loading works just fine, but when i try to perform a check i get the ERROR described above: (and it did work before without me changing code)
matches = grammar_tool.check(sent)
it doesnt even work with minimal config like:
grammar_tool = language_tool_python.LanguageTool("de-DE")
(same ERROR)
- I tried to pip uninstall and install again
- also uninstalled and installed the language-tool 5.7 part that gets downloaded and stored in .cache
(and i use the latest version)
@LeonHammerla, can you try with a different language config, like 'es' or 'en-US'? Do you still see an error then? I can't reproduce this on my end.
The Error was due to not enough disk space on my end. So the problem is solved. thx
thanks for following up!