From 8a3565579e3dd8ac0aa8529e11df6277d18be0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Wed, 17 Aug 2022 20:17:18 +0200 Subject: [PATCH] Also work on missing mask file --- scan_to_paperless/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan_to_paperless/process.py b/scan_to_paperless/process.py index 1a9d7cb0..cd16bb24 100755 --- a/scan_to_paperless/process.py +++ b/scan_to_paperless/process.py @@ -172,7 +172,7 @@ def _get_mask( if mask_file else auto_mask_config.get("additional_filename") ) - if mask_file: + if mask_file and os.path.exists(mask_file): mask = cv2.add( mask, cv2.bitwise_not(