Java_not_found_error

2022-05-30 18:33:33.862 Uncaught app exception
Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/tabula/io.py", line 80, in _run
    result = subprocess.run(
  File "/usr/local/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'java'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/script_runner.py", line 354, in _run_script
    exec(code, module.__dict__)
  File "/app/trimestral/Web.py", line 28, in <module>
    tabelas12019 = tabula.io.read_pdf(pdf_path_12019, pages='1-2')
  File "/home/appuser/venv/lib/python3.9/site-packages/tabula/io.py", line 322, in read_pdf
    output = _run(java_options, kwargs, path, encoding)
  File "/home/appuser/venv/lib/python3.9/site-packages/tabula/io.py", line 91, in _run
    raise JavaNotFoundError(JAVA_NOT_FOUND_ERROR)
tabula.errors.JavaNotFoundError: `java` command is not found from this Python process.Please ensure Java is installed and PATH is set for `java`

Hi @Willer_Seno_Trambuch, welcome to the Streamlit community!

When deploying on Streamlit Cloud and need a system-level dependency such as Java, you need to create a packages.txt file:

If you don’t need anything special, you can put the line default-jre in your packages.txt file and that should give you what you need.

Best,
Randy

FileNotFoundError: [Errno 2] No such file or directory: ‘java’

I’m still getting this error

I am also getting the same error
Can you please suggest any solutions

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.