Yaron Levi
06/23/2024, 8:55 AMsteps = [
pip_install_requirements(directory='.', requirements_file='requirements.txt')
]
flow_ref.deploy(
name=name,
work_pool_name="main-xs",
job_variables=job_variables,
tags=tags,
schedule=schedule,
parameters=parameters,
build=False,
steps=steps)
I am getting the error:
TypeError: Flow.deploy() got an unexpected keyword argument 'steps'
sys:1: RuntimeWarning: coroutine 'pip_install_requirements' was never awaited
Any idea what I’m doing wrong here?Marvin
06/23/2024, 8:55 AMdeploy()
function from the Prefect library does not accept a steps
argument. The error message TypeError: Flow.deploy() got an unexpected keyword argument 'steps'
indicates that steps
is not a valid parameter for the deploy()
method.
Additionally, the warning coroutine 'pip_install_requirements' was never awaited
suggests that you're using an async function without awaiting it, which can lead to runtime issues.
Here's what you should do:
1. Remove the steps
argument: Since it's not a supported argument, you'll need to omit it when calling deploy()
.
2. Await the coroutine: Ensure you await any async functions.
You can refer to the Prefect deployment guide for more details on how to correctly use the deploy()
method.
Let me know if you need further assistance!