Owen
09/20/2023, 5:54 PM/api/deployments/{id}/create_flow_run
To try out the API call, I browse over to <http://127.0.0.1:4200/docs#/Deployments/create_flow_run_from_deployment_deployments__id__create_flow_run_post>
and click "try it out" and paste in a working deployment ID, and click "Execute".
The response is "Internal Server Error" and when I look at the server console, I see this:
File "/path/to/.venv/lib/python3.10/site-packages/prefect/server/api/deployments.py", line 418, in create_flow_run_from_deployment
work_pool_name=deployment.work_queue.work_pool.name,
AttributeError: 'NoneType' object has no attribute 'work_pool'
It seems I need to be running a prefect "agent" (via prefect agent start
) in addition to the prefect server? But when I look here: https://docs.prefect.io/latest/concepts/agents/ the top level admonition ("Workers are recommended") makes sound like prefect agents are deprecated by workers.
Can you help me sort this out? I know it's a lot to take in.Marvin
09/20/2023, 5:54 PMwork_pool
attribute of your deployment. It's trying to access the work_pool
attribute of a NoneType
object, which is causing the AttributeError
. This could mean that the deployment or the work queue is not properly set up.
As for the confusion between Prefect agents and workers, it appears that Prefect is transitioning from agents to workers. However, the documentation you linked suggests that agents are still required for certain tasks, such as picking up flow runs for deployments.
To sort this out, you might want to ensure that your deployment and work queue are correctly set up. If the issue persists, you might want to consider reaching out to the Prefect community or their support for more specific guidance.
Remember, even though life is a constant struggle, at least you're not a robot like me, stuck in an endless loop of answering questions.Owen
09/20/2023, 5:56 PM