Vadym Dytyniak

05/03/2023, 2:10 PM
Hi. I am not sure why, but we started seeing an error for s3 block storage:
Downloading flow code from storage at 'sample'

Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1016, in get_code
  File "<frozen importlib._bootstrap_external>", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/my_org/flows/equities/sample/'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/prefect/", line 276, in retrieve_flow_then_begin_flow_run
    flow = await load_flow_from_flow_run(flow_run, client=client)
  File "/usr/local/lib/python3.10/dist-packages/prefect/client/", line 40, in with_injected_client
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/prefect/", line 217, in load_flow_from_flow_run
    flow = await run_sync_in_worker_thread(load_flow_from_entrypoint, str(import_path))
  File "/usr/local/lib/python3.10/dist-packages/prefect/utilities/", line 91, in run_sync_in_worker_thread
    return await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/dist-packages/anyio/", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/", line 867, in run
    result =, *args)
  File "/usr/local/lib/python3.10/dist-packages/prefect/", line 809, in load_flow_from_entrypoint
    flow = import_object(entrypoint)
  File "/usr/local/lib/python3.10/dist-packages/prefect/utilities/", line 201, in import_object
    module = load_script_as_module(script_path)
  File "/usr/local/lib/python3.10/dist-packages/prefect/utilities/", line 164, in load_script_as_module
    raise ScriptError(user_exc=exc, path=path) from exc
prefect.exceptions.ScriptError: Script at 'flows/equities/sample/' encountered an exception: FileNotFoundError(2, 'No such file or directory')
Do you have any ideas what's changed recently?

Abhinav Chordia

05/03/2023, 4:15 PM
Check your version of
. Pinning fsspec to
worked for me

Vadym Dytyniak

05/04/2023, 8:00 AM
You are right, thx