mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-12 19:17:13 +00:00
Account for KeyError problem in #345
This commit is contained in:
1 parent
20a4a66a57
commit
c983e73d0f
1 file changed
+1
-1
@@ -285,7 +285,7 @@ def image_to_string(args):
|
||||
try:
|
||||
orientation = ocr.detect_orientation(f, lang=lang)
|
||||
f = f.rotate(orientation["angle"], expand=1)
|
||||
except (TesseractError, OtherTesseractError):
|
||||
except (TesseractError, OtherTesseractError, KeyError):
|
||||
pass
|
||||
return ocr.image_to_string(f, lang=lang)
|
||||
|
||||
|
||||
Reference in new issue
Block a user