Hi everyone I was trying to create a flow using prefect for python but I get the error TypeError: 'fn' must be callable, I already install all the packages and I have tried in different IDE like vs code and colab but the result is the same.
the code is:
from prefect import task, Flow
@task()
def load():
print("Loading data")
with Flow("Hello-world") as flow:
load()
flow.run()
#ERROR
TypeError: 'fn' must be callable
I tried changing the code to this but I get a different error:
from prefect import task, Flow
@task()
def load():
print("Loading data")
with Flow(name = "Hello-world") as flow:
load()
flow.run()
#ERROR
TypeError: Flow.__init__() missing 1 required positional argument: 'fn'