Riccardo Tesselli
07/20/2022, 8:08 AMconfig = CustomConfig.load('my_block')
Deployment(
name="My deployment",
flow=my_flow,
parameters={
"password": config.password
}
)
when I run this command from CLI
prefect deployment create my_deployment.py
I get this error
AttributeError: 'coroutine' object has no attribute 'password'
Failed to load deployments from 'my_deployment.py'
sys:1: RuntimeWarning: coroutine 'Block.load' was never awaited
How can I do that?Anna Geller
07/20/2022, 10:33 AMRiccardo Tesselli
07/20/2022, 11:24 AMDeployment.create()
, but now I’m facing with this error:if __name__ == '__main__':
config = CustomConfig.load('my_setup')
deployment = Deployment(
name="MyDeployment",
flow=my_flow,
parameters={
"password": config.password,
"slack_webhook": config.slack_webhook }
)
deployment.create()
and I get this
TypeError: Object of type 'AsyncWebhookClient' is not JSON serializable
if __name__ == '__main__':
config = CustomConfig.load('my_setup')
deployment = Deployment(
name="MyDeployment",
flow=my_flow,
parameters={
"password": config.password,
"slack_webhook": config.slack_webhook.url }
)
deployment.create()
Anna Geller
07/20/2022, 12:50 PM