I only recently installed `prefect-dask` and my fl...
# prefect-community
c
I only recently installed
prefect-dask
and my flows that use
prefect-shell
's
shell_run_command
started failing with the following error:
Copy code
Encountered exception during execution:
Traceback (most recent call last):
  File "C:\scripts\prefect2\lib\site-packages\prefect\engine.py", line 1478, in orchestrate_task_run
    result = await task.fn(*args, **kwargs)
  File "C:\scripts\prefect2\lib\site-packages\prefect_shell\commands.py", line 86, in shell_run_command
    async with await open_process(
  File "C:\scripts\prefect2\lib\site-packages\anyio\_core\_subprocesses.py", line 127, in open_process
    return await get_asynclib().open_process(
  File "C:\scripts\prefect2\lib\site-packages\anyio\_backends\_asyncio.py", line 1105, in open_process
    process = await asyncio.create_subprocess_exec(
  File "C:\python310\lib\asyncio\subprocess.py", line 218, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
  File "C:\python310\lib\asyncio\base_events.py", line 1675, in subprocess_exec
    transport = await self._make_subprocess_transport(
  File "C:\python310\lib\asyncio\base_events.py", line 498, in _make_subprocess_transport
    raise NotImplementedError
NotImplementedError
Whenever I do uninstall prefect-dask via
pip uninstall prefect-dask
, everything goes back to working smoothly. This seems related to asyncio based on the error. Anyone has any clues as to why this might be happening?
z
Ooo
You’ve been a great help 🙂
We’ve been trying to figure out what library is causing this behavior
The default event loop in Python 3.8+ supports spawning subprocesses on Windows, but another one doesn’t and something is changing that default event loop.
🤔 1
c
Glad I could help! I did spend quite a long time creating recreating virtual environments and installing libraries one by one. Through trial and error I narrowed it down to that one.
🙏 1
z
If you’re feeling particularly ambitious, it’d be great to have confirmation that the reproduction I posted there fails and the traceback for it.
I don’t have a Windows machine easily accessible 😄
c
Done
z
Thanks!
👍 1