diff --git a/transkribus_utils/transkribus_utils.py b/transkribus_utils/transkribus_utils.py index a4bd87a..68c7247 100644 --- a/transkribus_utils/transkribus_utils.py +++ b/transkribus_utils/transkribus_utils.py @@ -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}")