From 5921a551d963003dd46a5280aefe11a72b5b6872 Mon Sep 17 00:00:00 2001 From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Fri, 6 Sep 2024 08:28:27 -0700 Subject: [PATCH] Adds an initial check that tesseract is locatable --- src/paperless_tesseract/checks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/paperless_tesseract/checks.py b/src/paperless_tesseract/checks.py index 82d255005..4d5d98284 100644 --- a/src/paperless_tesseract/checks.py +++ b/src/paperless_tesseract/checks.py @@ -21,6 +21,9 @@ def get_tesseract_langs(): @register() def check_default_language_available(app_configs, **kwargs): + if shutil.which("tesseract") is None: + return [Error("Executable 'tesseract' was not located")] + installed_langs = get_tesseract_langs() if not settings.OCR_LANGUAGE: