I'm trying to use sciencebasepy to test automated uploading of data, and running into this error:
python upload_gmprocess.py /data/gmprocess/comprehensive/data/ci14383980/workspace.h5
Password:
Uploading |################################| 8/8
<Response [400]>
Failed to publish file /data/gmprocess/comprehensive/data/ci14383980/workspace.h5 to public S3 bucket
The code snippet that results in the error:
session = None
try:
session = sciencebasepy.SbSession().loginc(DEFAULT_USER)
jdict_item = session.upload_file_and_create_item(
PARENT_ITEM, str(metadata_filename)
)
item_id = jdict_item["id"]
updated_item_id = session.upload_cloud_file_to_item(
item_id, str(workspace_file)
)
assert updated_item_id["id"] == item_id
session.publish_array_to_public_bucket(item_id, [str(workspace_file)])
except Exception as e:
print(
f"Failed to login or upload file for user {DEFAULT_USER}. Error '{e}'. Exiting."
)
sys.exit(1)
finally:
if session is not None:
session.logout()
I'm trying to use sciencebasepy to test automated uploading of data, and running into this error:
The code snippet that results in the error: