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

[Bug] Exception is thrown when entering on_dataset_flow_failure #158

Open
phwissmann opened this issue Mar 6, 2025 · 0 comments · May be fixed by #163
Open

[Bug] Exception is thrown when entering on_dataset_flow_failure #158

phwissmann opened this issue Mar 6, 2025 · 0 comments · May be fixed by #163
Assignees
Labels
bug Something isn't working

Comments

@phwissmann
Copy link
Collaborator

Describe the bug
Exception is thrown when entering on_dataset_flow_failure:
https://scopem-openem.ethz.ch/archiver/prefect/ui/runs/flow-run/117ebeab-7467-48bf-aaed-aad38b321e2f

archiver.flows.utils.SystemError: Datablock ae5f6e3f-ff32-4073-9dd2-416842e19f27 does not exist at openem-network/datasets/2675/datablocks/2675_0.tar.gz in LTS

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/archiver/.venv/lib/python3.11/site-packages/prefect/flow_engine.py", line 542, in call_hooks
    result = hook(flow, flow_run, state)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/archiver/flows/retrieve_datasets_flow.py", line 48, in on_dataset_flow_failure
    datablocks_operations.cleanup_scratch(flow_run.parameters["dataset_id"])
  File "/app/backend/archiver/utils/log.py", line 27, in wrapper_decorator
    value = func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/archiver/utils/datablocks.py", line 577, in cleanup_scratch
    shutil.rmtree(StoragePaths.scratch_folder(dataset_id))
  File "/usr/local/lib/python3.11/shutil.py", line 742, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/usr/local/lib/python3.11/shutil.py", line 740, in rmtree
    orig_st = os.lstat(path, dir_fd=dir_fd)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/scratch/archival/openem-network/datasets/2675'
@phwissmann phwissmann added the bug Something isn't working label Mar 6, 2025
@phwissmann phwissmann self-assigned this Mar 6, 2025
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

Successfully merging a pull request may close this issue.

1 participant