From 2fd2cc8b777195167bac3fd603ffae267ba3fee4 Mon Sep 17 00:00:00 2001 From: aaronm-2112 Date: Thu, 26 Dec 2024 13:01:29 -0800 Subject: [PATCH] chore: log pennsieve agent error --- src/pyflask/prepareMetadata/prepare_metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyflask/prepareMetadata/prepare_metadata.py b/src/pyflask/prepareMetadata/prepare_metadata.py index b008702fc..f6b5e6b6a 100644 --- a/src/pyflask/prepareMetadata/prepare_metadata.py +++ b/src/pyflask/prepareMetadata/prepare_metadata.py @@ -214,6 +214,7 @@ def subscriber_metadata(ps, events_dict): ps.unsubscribe(10) def upload_metadata_file(file_type, bfaccount, bfdataset, file_path, delete_after_upload): + global namespace_logger # check that the Pennsieve dataset is valid selected_dataset_id = get_dataset_id(bfdataset) @@ -237,12 +238,12 @@ def upload_metadata_file(file_type, bfaccount, bfdataset, file_path, delete_afte r.raise_for_status() try: ps = connect_pennsieve_client(bfaccount) - authenticate_user_with_client(ps, bfaccount) # create a new manifest for the metadata file ps.use_dataset(selected_dataset_id) manifest = ps.manifest.create(file_path) m_id = manifest.manifest_id except Exception as e: + namespace_logger.info(e) error_message = "Could not create manifest file for this dataset" abort(500, error_message)