https://prefect.io logo
a

Andrew W

07/04/2023, 10:20 AM
Hi Prefect Community, I was previously able to create flow deployments off of my local files, however, recently when I've tried to do this I keep getting the following error message.
Copy code
Downloading flow code from storage at 'C:...'

flow could not be retrieved from deployment.
Traceback (most recent call last):
lib\site-packages\prefect\engine.py", line 318, in retrieve_flow_then_begin_flow_run
    flow = await load_flow_from_flow_run(flow_run, client=client)
lib\site-packages\prefect\client\utilities.py", line 40, in with_injected_client
    return await fn(*args, **kwargs)
lib\site-packages\prefect\deployments.py", line 197, in load_flow_from_flow_run
    await storage_block.get_directory(from_path=deployment.path, local_path=".")
lib\site-packages\prefect\filesystems.py", line 963, in get_directory
    process = await run_process(cmd, stream_output=(out_stream, err_stream))
lib\site-packages\prefect\utilities\processutils.py", line 258, in run_process
    async with open_process(
lib\contextlib.py", line 181, in __aenter__
    return await self.gen.__anext__()
lib\site-packages\prefect\utilities\processutils.py", line 200, in open_process
    process = await _open_anyio_process(command, **kwargs)
lib\site-packages\prefect\utilities\processutils.py", line 162, in _open_anyio_process
    process = await asyncio.create_subprocess_shell(
lib\asyncio\subprocess.py", line 216, in create_subprocess_shell
    transport, protocol = await loop.subprocess_shell(
lib\asyncio\base_events.py", line 1643, in subprocess_shell
    transport = await self._make_subprocess_transport(
lib\asyncio\base_events.py", line 498, in _make_subprocess_transport
    raise NotImplementedError
NotImplementedError
The problem has occured in a number of different places for me, for example, when trying to use a prefect shell or using a GitHub block. In this case, it seems like the
storage_block.get_directory()
is called which then causes a cmd shell command to be run. And this process always ends up in the
_make_subprocess_transport
function which hasn't been implemented. Has anyone bumped into this error before? Any help would be extremely appreciated. Thanks. P.S I'm using
prefect 2.10.12, python 3.9.13, and I am on Windows
1
In case anyone else bumps into this error. The issue is due to prefect-dask. http://github.com/dask/distributed/issues/7492