language_tool_python icon indicating copy to clipboard operation
language_tool_python copied to clipboard

JSON-Decode-Error

Open LeonHammerla opened this issue 2 years ago • 4 comments

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 avatar Oct 04 '22 00:10 LeonHammerla

@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).

jxmorris12 avatar Oct 04 '22 14:10 jxmorris12

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)

LeonHammerla avatar Oct 06 '22 11:10 LeonHammerla

it doesnt even work with minimal config like:

grammar_tool = language_tool_python.LanguageTool("de-DE")

(same ERROR)

LeonHammerla avatar Oct 06 '22 13:10 LeonHammerla

  1. I tried to pip uninstall and install again
  2. also uninstalled and installed the language-tool 5.7 part that gets downloaded and stored in .cache

(and i use the latest version)

LeonHammerla avatar Oct 06 '22 13:10 LeonHammerla

@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.

jxmorris12 avatar Oct 24 '22 19:10 jxmorris12

The Error was due to not enough disk space on my end. So the problem is solved. thx

LeonHammerla avatar Feb 11 '23 21:02 LeonHammerla

thanks for following up!

jxmorris12 avatar Feb 13 '23 18:02 jxmorris12