Lee Cullen
02/22/2022, 9:11 PMFailed to load and execute Flow's environment: ValueError('No flows found in file.')
.
The flow context manager is defined within the body of a function that returns a flow, I'm wondering if that is the reason why cloud can't find the flow?Anna Geller
Lee Cullen
02/22/2022, 9:51 PMreturn flow.register(project_name=prefect_cloud_project, idempotency_key=flow.serialized_hash())
Registering the flow is automatically triggered every time I make a commit using bitbucket pipelines.
Let me know if you need anymore info.Kevin Kho
build_flow1
in this file.Lee Cullen
02/22/2022, 10:10 PMreturn flow
with return flow.run()
?if __name__ == "__main__":
build_flow1(env, cache)
Kevin Kho
Lee Cullen
02/22/2022, 10:50 PMKevin Kho
if __name__ == "__main__":
I guess it’s not called by Prefect when it goes it and loads in the file. Just return the Flow and call build_flow1
(just go get the flow object in the global namespace). It won’t run anything anywayLee Cullen
02/22/2022, 11:26 PMKevin Kho
flow = build_flow1(...)
so that it stays as a variableLee Cullen
02/23/2022, 12:37 AMKevin Kho