Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Mention FORGIVING_OCR config option when language detection fails.

David Martinb350ec48b7f5
diff --git a/src/paperless_tesseract/parsers.py b/src/paperless_tesseract/parsers.py
index dc5dbd637..ffa2727e5 100644
--- a/src/paperless_tesseract/parsers.py
+++ b/src/paperless_tesseract/parsers.py
@@ -153,7 +153,10 @@ class RasterisedDocumentParser(DocumentParser):
)
raw_text = self._assemble_ocr_sections(imgs, middle, raw_text)
return raw_text
- raise OCRError("Language detection failed")
+ error_msg = ("Language detection failed. Set "
+ "PAPERLESS_FORGIVING_OCR in config file to continue "
+ "anyway.")
+ raise OCRError(error_msg)
if ISO639[guessed_language] == self.DEFAULT_OCR_LANGUAGE:
raw_text = self._assemble_ocr_sections(imgs, middle, raw_text)