Hi, I am calling flow from run_deployment method. ...
# ask-community
s
Hi, I am calling flow from run_deployment method.
Copy code
flow_result = await run_deployment(
        name="some_flow_1/dev",
        parameters={"body": query}
    )
This returns flow run metadata. How do i get the actual return data which some_flow_1 returns ?? I was trying persisted result method, where i mention in task and flow as (persist_result=True) . but it throws permission error
Copy code
flow_result = dict(flow_result)
result_data = flow_result['state'].result
persisted_result = result_data()
client = get_client()
actual_data = await persisted_result.get(client=client)
<http://logger.info|logger.info>(f"Retrieved Data:{actual_data}")
Error:
Copy code
actual_data = await persisted_result.get(client=client)
  ......
.......
......
  File "/home/sandeep/.pyenv/versions/3.9.0/lib/python3.9/pathlib.py", line 1221, in stat
    return self._accessor.stat(self)
PermissionError: [Errno 13] Permission denied: '/root/.prefect/storage/5198df6f8c0547a5b018a34ea1b9f6f2'