Skip to content

Commit

Permalink
raise exception when missing
Browse files Browse the repository at this point in the history
  • Loading branch information
MehmedGIT committed Sep 26, 2023
1 parent 81bb1ac commit 64b3563
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ocrd/ocrd/processor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ def zip_input_files(self, require_first=True, mimetype=None, on_error='skip'):
# might be because of invalid page_id (range)
if self.page_id and not files_:
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'.")
if on_error == 'abort':
raise ValueError(f"Could not find any files for --page-id {self.page_id} - compare "
f"'{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 64b3563

Please sign in to comment.