Skip to content

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

Improve the unknown language error message

Daniel Quinn117d7dad0494
diff --git a/src/paperless_tesseract/parsers.py b/src/paperless_tesseract/parsers.py
index e3c2ed361..f54461161 100644
--- a/src/paperless_tesseract/parsers.py
+++ b/src/paperless_tesseract/parsers.py
@@ -172,8 +172,8 @@ class RasterisedDocumentParser(DocumentParser):
raw_text = self._assemble_ocr_sections(imgs, middle, raw_text)
return raw_text
raise OCRError(
- "The guessed language is not available in this instance of "
- "Tesseract."
+ "The guessed language ({}) is not available in this instance "
+ "of Tesseract.".format(guessed_language)
)
def _ocr(self, imgs, lang):