Skip to content

Commit

Permalink
try execpt for collection_to_mets
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Dec 18, 2023
1 parent 384f0e3 commit 776adaf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion transkribus_utils/transkribus_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ def collection_to_mets(self, col_id, file_path=".", filter_by_doc_ids=[]):
print(f"{len(doc_ids)} to download")
counter = 1
for doc_id in doc_ids:
save_mets = self.save_mets_to_file(doc_id, col_id, file_path=col_dir)
try:
save_mets = self.save_mets_to_file(doc_id, col_id, file_path=col_dir)
except Exception as e:
print(f"failed to save mets for DOC-ID: {doc_id} in COLLECTION: {col_id} due to ERROR: {e}")
counter += 1
continue
file_list = self.save_image_names_to_file(doc_id, col_id, file_path=col_dir)
print(f"saving: {save_mets}")
print(f"saving: {file_list}")
Expand Down

0 comments on commit 776adaf

Please sign in to comment.