Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploaded file not cleaned up after SciCat upload failure #71

Open
jl-wynen opened this issue Mar 15, 2023 · 0 comments
Open

Uploaded file not cleaned up after SciCat upload failure #71

jl-wynen opened this issue Mar 15, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jl-wynen
Copy link
Collaborator

jl-wynen commented Mar 15, 2023

Trying to upload a dataset + file to staging.ess.eu, I got this exception:

Traceback (most recent call last):
  File "/home/jl/Documents/Workshops/DMSC-scicat-2023-03/workflow/make-data.py", line 142, in <module>
    main()
  File "/home/jl/Documents/Workshops/DMSC-scicat-2023-03/workflow/make-data.py", line 135, in main
    upload_datasets(dsets)
  File "/home/jl/Documents/Workshops/DMSC-scicat-2023-03/workflow/make-data.py", line 111, in upload_datasets
    client.upload_new_dataset_now(d)
  File "/home/jl/Software/mambaforge/envs/scicat-workshop/lib/python3.9/site-packages/scitacean/client.py", line 225, in upload_new_dataset_now
    finalized_model = self.scicat.create_dataset_model(dataset.make_model())
  File "/home/jl/Software/mambaforge/envs/scicat-workshop/lib/python3.9/site-packages/scitacean/client.py", line 556, in create_dataset_model
    uploaded = self._call_endpoint(
  File "/home/jl/Software/mambaforge/envs/scicat-workshop/lib/python3.9/site-packages/scitacean/client.py", line 637, in _call_endpoint
    response = self._send_to_scicat(cmd=cmd, url=full_url, data=data)
  File "/home/jl/Software/mambaforge/envs/scicat-workshop/lib/python3.9/site-packages/scitacean/client.py", line 623, in _send_to_scicat
    raise type(exc)(exc.args) from None
requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='staging.ess.eu', port=443): Max retries exceeded with url: /api/v3/Datasets?access_token=OMITTED (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9348422d00>: Failed to establish a new connection: [Errno -2] Name or service not known'))"),)

But the file was not removed from the remote. (There is no dataset in the catalogue)

The error was triggered by an incorrect SciCat URL.

@jl-wynen jl-wynen added the bug Something isn't working label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant