Hello hello, i am running into this error in Prefe...
# prefect-community
j
Hello hello, i am running into this error in Prefect 1 when using
get_task_run_result
from a dependent flow. The child flow runs and is successful, but the parent flow seems to be unaware of that? we are using local storage to persist task results. this error only happens sometimes.
Copy code
Task 'get_task_run_result': Exception encountered during task execution!
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/prefect/engine/task_runner.py", line 880, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/usr/local/lib/python3.9/site-packages/prefect/utilities/executors.py", line 468, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/prefect/tasks/prefect/flow_run.py", line 239, in get_task_run_result
    return task_run.get_result()
  File "/usr/local/lib/python3.9/site-packages/prefect/backend/task_run.py", line 73, in get_result
    raise ValueError("The task result cannot be loaded if it is not finished.")
ValueError: The task result cannot be loaded if it is not finished.

Task 'get_task_run_result': Finished task run for task with final state: 'Failed'