From 1476d95beee5a9a787995be81f6e9ce4db5779ac Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Mon, 11 Sep 2023 14:13:11 +0200 Subject: [PATCH] downgrade ValueError to log.warning about inconsistent pageId for processor calls --- ocrd/ocrd/processor/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocrd/ocrd/processor/base.py b/ocrd/ocrd/processor/base.py index 5864277f4..6876c45ea 100644 --- a/ocrd/ocrd/processor/base.py +++ b/ocrd/ocrd/processor/base.py @@ -9,6 +9,7 @@ 'run_processor' ] +from warnings import warn from pkg_resources import resource_filename from os.path import exists from shutil import copyfileobj @@ -352,7 +353,7 @@ def zip_input_files(self, require_first=True, mimetype=None, on_error='skip'): # Warn if no files found but pageId was specified because that # might be because of invalid page_id (range) if self.page_id and not files_: - raise ValueError(f"Could not find any files for --page-id {self.page_id} - compare {self.page_id} with the output of 'orcd workspace list-page'.") + LOG.warning(f"Could not find any files for --page-id {self.page_id} - compare '{self.page_id}' with the output of 'orcd workspace list-page'.") for file_ in files_: if not file_.pageId: continue