<@ULVA73B9P> in my prefect 2.20 setup this call: ...
# ask-marvin
m
@Marvin in my prefect 2.20 setup this call: training_deployment = training_flow.deploy( name=f"{flow_entrypoint}_on_{workpool}", work_pool_name=workpool, image=base_image, build=False, push=False, ) causes this error: Unexpected error occurred: Block not found. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/prefect/deployments/runner.py", line 318, in apply deployment_id = await client.create_deployment(**create_payload)
m
The error "Block not found" typically indicates that the deployment process is unable to locate a required block configuration in Prefect. This can occur if the block hasn't been created or registered in your Prefect setup. Here are some steps to troubleshoot and resolve this issue: 1. Verify Block Configuration: Ensure that the block configuration you are referencing in your deployment is correctly defined and registered. This might involve checking your Prefect UI to ensure the block exists. 2. Deployment YAML: If you're using a
deployment.yaml
file, make sure all block references are correctly defined. You might need to run the
prefect deployment apply
command to register the deployment with the Prefect API. More details can be found here. 3. Prefect CLI: Use the Prefect CLI to list and inspect existing deployments. This can help verify if the deployment was registered correctly. You can run
prefect deployment ls
to view existing deployments. 4. Check for Updates: Ensure your Prefect version is up to date, as there might be fixes or improvements related to deployment handling. If the issue persists, reviewing the Prefect GitHub issues for similar problems or creating a new issue with detailed information might also help. You can refer to this GitHub pull request for more context on recent changes related to deployment handling in Prefect. If you have more specific details about the block or deployment setup, I can assist further.