https://prefect.io logo
z

Zach Schuster

08/30/2023, 11:42 PM
error coming from
prefect deploy
running in terminal
Copy code
Traceback (most recent call last):
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
    return fn(*args, **kwargs)
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
    return call()
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 382, in __call__
    return self.result()
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 282, in result
    return self.future.result(timeout=timeout)
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 168, in result
    return self.__get_result()
  File "/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/_internal/concurrency/calls.py", line 345, in _run_async
    result = await coro
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/cli/deploy.py", line 249, in deploy
    await _run_single_deploy(
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/client/utilities.py", line 51, in with_injected_client
    return await fn(*args, **kwargs)
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/cli/deploy.py", line 312, in _run_single_deploy
    deploy_config["entrypoint"] = await prompt_entrypoint(app.console)
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/cli/_prompts.py", line 598, in prompt_entrypoint
    discovered_flows = await _search_for_flow_functions()
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/deployments/base.py", line 555, in _search_for_flow_functions
    return [fn for file_fns in await asyncio.gather(*coros) for fn in file_fns]
  File "/Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/deployments/base.py", line 471, in _find_flow_functions_in_file
    async with OPEN_FILE_SEMAPHORE:
  File "/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/locks.py", line 14, in __aenter__
    await self.acquire()
  File "/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/locks.py", line 417, in acquire
    await fut
RuntimeError: Task <Task pending name='Task-5251' coro=<_find_flow_functions_in_file() running at /Users/zachs/Documents/repos/prefect_cert_course/venv/lib/python3.9/site-packages/prefect/deployments/base.py:471> cb=[_gather.<locals>._done_callback() at /usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py:767]> got Future <Future pending> attached to a different loop
An exception occurred.
e

Emil Christensen

08/30/2023, 11:45 PM
Both Alex and Zach are seeing. Happens when a
venv
folder is present. Both are on Mac.
j

Jeff Hale

08/31/2023, 12:11 AM
I think the problem might be this: https://prefect-community.slack.com/archives/CL09KU1K7/p1693439546653409 @Alex Guo @Zach Schuster