Dear All, I am relatively new to prefect. I am using prefect 2.0. I have followed the official Docs on how to create and run deployments. I am using AWS S3 as my block storage. I successfully upload the files to my block in S3 bucket and the first run is always successful. However, when i try to run the deployment from prefect UI, I always get this error "Flow run <run-name> - Flow could not be retrieved from deployment" AND "TypeError: object NoneType can't be used in 'await' expression". I have tried Docker infrastructure and the default LocalProcess. I have changed the IAM role on the AWS EC2 instance am using but does not seem to work. I NEED HELP. THANK YOU
✅ 1
a
Anna Geller
11/19/2022, 3:18 PM
how do you create a deployment?
also, better to wrap the flow function call in main:
Copy code
from prefect import flow, task
# import function subflow from my_subflow.py file
from subflow import my_subflow
@task(name="Print Hello")
def print_hello(name):
msg = f"Hello {name}!"
print(msg)
return msg
@flow(name="Hello Flow")
def hello_world(name="world"):
message = print_hello(name)
my_subflow(message)
if __name__ == "__main__":
hello_world()
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.