Aisha Merhebi
09/26/2022, 11:56 AMJeff Hale
09/26/2022, 12:39 PMAisha Merhebi
09/26/2022, 12:43 PM4:56:10.590 | ERROR | prefect.agent - Failed to submit flow run 'b459f41b-5bee-4506-9233-1e8159a4dc60' to infrastructure.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prefect/agent.py", line 199, in submit_run
await self.task_group.start(submit_flow_run, flow_run, infrastructure)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in start
return await future
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prefect/infrastructure/submission.py", line 48, in submit_flow_run
return await infrastructure.run(task_status=task_status)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prefect/infrastructure/process.py", line 66, in run
process = await run_process(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prefect/utilities/processutils.py", line 65, in run_process
async with open_process(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 199, in __aenter__
return await anext(self.gen)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prefect/utilities/processutils.py", line 28, in open_process
process = await anyio.open_process(command, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/anyio/_core/_subprocesses.py", line 127, in open_process
return await get_asynclib().open_process(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1105, in open_process
process = await asyncio.create_subprocess_exec(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/subprocess.py", line 218, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1652, in subprocess_exec
transport = await self._make_subprocess_transport(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/unix_events.py", line 207, in _make_subprocess_transport
transp = _UnixSubprocessTransport(self, protocol, args, shell,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_subprocess.py", line 36, in __init__
self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/unix_events.py", line 799, in _start
self._proc = subprocess.Popen(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1842, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python'
import sys
import prefect
from prefect import flow, task, get_run_logger
#from utilities import AN_IMPORTED_MESSAGE
from prefect.deployments import Deployment
@task
def log_task(name):
logger = get_run_logger()
<http://logger.info|logger.info>("Hello %s!", name)
<http://logger.info|logger.info>("Prefect Version = %s ๐", prefect.__version__)
#logger.debug(AN_IMPORTED_MESSAGE)
@flow()
def log_flow(name: str):
log_task(name)
deployment = Deployment.build_from_flow(
flow=log_flow,
name="log-simple",
parameters={"name": "Marvin"},
infra_overrides={"env": {"PREFECT_LOGGING_LEVEL": "DEBUG"}},
#work_queue_name="test",
)
if __name__ == "__main__":
deployment.apply()
Jeff Hale
09/26/2022, 1:15 PMpython this_file.py
to create the deployment?
Then you start an agent?
Then you create a flow run?
When do you get the error?Aisha Merhebi
09/26/2022, 1:39 PMpython3 this_file.py
deployment get created i try to run the deployment it fails and this error show in agent logsJeff Hale
09/26/2022, 2:03 PMAisha Merhebi
09/26/2022, 2:09 PM