Ton Steijvers

06/26/2023, 2:14 PM
Hello, we sometimes see this error in our Prefect flows:
Copy code
State data is missing. Typically, this occurs when result persistence is disabled and the state has been retrieved from the API.
The code is something like this:
Copy code
async def parallel_flow(list_of_org_ids):
    concurrency_limit = asyncio.Semophore(8)
    async def core_run(org_id: str):
        async with concurrency_limit:
            return await run_deployment(

    results = await asyncio.gather( *[core_run(org_id) for org_id in list_of_org_ids] )
    return [(, result.state_name) for result in results]
I cannot see the reason for the above error since the results array should be resolved and available at the time of the return statement. Are there other causes for this error to occur?