mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-01 11:19:32 -05:00
Account for KeyError problem in #345
This commit is contained in:
parent
f3f86242de
commit
bce2d3dd22
@ -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, KeyError):
|
||||
except (TesseractError, OtherTesseractError, AttributeError):
|
||||
pass
|
||||
return ocr.image_to_string(f, lang=lang)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user