Hi i am trying to register prefect flow with a sch...
# ask-community
h
Hi i am trying to register prefect flow with a schedule using django API and am getting error {'_schema': 'Invalid data type: None'}. Does anyone have any solution?
k
Hi Himanshu, could you provide some more details or code snipped for how you are registering the flow or the stack trace for the error?
h
I am using this code to register my flow:
def register_flow(flow, project_name, flow_name=None, flow_params=None, schedule=None):
new_flow = flow.copy()  # Create a flow copy
new_flow.run_config = UniversalRun(labels=["DESKTOP-ABCD"])
if flow_name:
new_flow.name = flow_name
new_flow.schedule = schedule
client = Client(api_key=config("PREFECT_API_KEY"))
flow_id = client.register(new_flow, project_name=project_name, build=False)
return flow_id
I am getting this error:
But when I used
new_flow.register(project_name)
in place of `client.register()` it did not give this error.
k
Hi Himanshu, have you tried to set the build=True for the
client.register()
h
Yes i have tried that
I got this error message at that time: "This flow has no storage to build"