Kaleb King
09/21/2023, 1:25 PMexpected_start_timeprefect flow-run inspect...Marvin
09/21/2023, 1:25 PMexpected_start_timepython
from prefect import Client
# Instantiate the client
client = Client()
# Get the flow run details
flow_run_info = client.get_flow_run_info(flow_run_id="your-flow-run-id")
# Access the expected_start_time
expected_start_time = flow_run_info.state.start_time"your-flow-run-id"expected_start_timestateClientKaleb King
09/21/2023, 1:29 PMfrom prefect import get_client
# Instantiate the client
client = get_client()
# Get the flow run details
flow_run_info = client.get_flow_run_info(flow_run_id="your-flow-run-id")
# Access the expected_start_time
expected_start_time = flow_run_info.state.start_time---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Untitled-1.ipynb Cell 1 line 1
      7 flow_run_info = client.read_flow_run(flow_run_id="1997add5-a126-4fcd-88f2-01fdea6d812b")
      9 # Access the expected_start_time
---> 10 expected_start_time = flow_run_info.state.start_time
AttributeError: 'coroutine' object has no attribute 'state'Marvin
09/21/2023, 1:29 PMget_flow_run_infopython
import asyncio
from prefect import Client
# Instantiate the client
client = Client()
async def get_flow_run_info():
    # Get the flow run details
    flow_run_info = await client.get_flow_run_info(flow_run_id="your-flow-run-id")
    # Access the expected_start_time
    expected_start_time = flow_run_info.state.start_time
    return expected_start_time
# Run the coroutine in an event loop
expected_start_time = asyncio.run(get_flow_run_info())"your-flow-run-id"get_flow_run_infoget_flow_run_infoexpected_start_time