Forums

language_tool_python, Java , and PythonAnywhere

I'm trying to import a project from my computer onto PyA. My project uses language_tool_project, which depends on Java to some extent. When I try to run my python file, I get the following error:

    (dethesaurize) 02:31 ~/DethesaurizeBot/src (master)$ python3.8 DethesaurizeThisBot.py 
Traceback (most recent call last):
  File "DethesaurizeThisBot.py", line 16, in <module>
    tool = language_tool_python.LanguageTool('en-US')
  File "/home/kevinlinxc/.virtualenvs/dethesaurize/lib/python3.8/site-packages/language_tool_python/server.py", line 45, in __init__
    self._start_server_on_free_port()
  File "/home/kevinlinxc/.virtualenvs/dethesaurize/lib/python3.8/site-packages/language_tool_python/server.py", line 181, in _start_server_on_free_port
    self._start_local_server()
  File "/home/kevinlinxc/.virtualenvs/dethesaurize/lib/python3.8/site-packages/language_tool_python/server.py", line 191, in _start_local_server
    download_lt()
  File "/home/kevinlinxc/.virtualenvs/dethesaurize/lib/python3.8/site-packages/language_tool_python/download_lt.py", line 144, in download_lt
    confirm_java_compatibility()
  File "/home/kevinlinxc/.virtualenvs/dethesaurize/lib/python3.8/site-packages/language_tool_python/download_lt.py", line 77, in confirm_java_compatibility
    output = subprocess.check_output([java_path, '-version'],
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/java', '-version']' returned non-zero exit status 127.

I'm assuming that this is a problem with Java, and I've read in other posts that Java on PyA is doomed. Is there anything I can do about this?

There is no java on PythonAnywhere yet.