Skip to content

Commit

Permalink
downgrade ValueError to log.warning about inconsistent pageId for pro…
Browse files Browse the repository at this point in the history
…cessor calls
  • Loading branch information
kba committed Sep 11, 2023
1 parent 6b36e48 commit 1476d95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ocrd/ocrd/processor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1476d95

Please sign in to comment.