mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-24 07:18:11 +01:00
Merge pull request #421 from ddddavidmartin/clarify_forgiving_ocr_handling
Clarify forgiving ocr handling
This commit is contained in:
commit
bd95804fbf
2 changed files with 9 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue