Cannot get runs from job

Hi,
I am able to get a job by its id (along with api key, owner etc etc), but I am unable to get its runs. When the code hits: runs = job.runs[0] I get:

run = job.runs[0]
  File "/home/appuser/venv/lib/python3.9/site-packages/pollination_streamlit/interactors.py", line 128, in runs
    df = self.runs_dataframe
  File "/home/appuser/venv/lib/python3.9/site-packages/pollination_streamlit/interactors.py", line 124, in runs_dataframe
    return RunsDataFrame.from_run_results(self._runs)
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 618, in wrapped_func
    return get_or_create_cached_value()
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 602, in get_or_create_cached_value
    return_value = non_optional_func(*args, **kwargs)
  File "/home/appuser/venv/lib/python3.9/site-packages/pollination_streamlit/dataframe.py", line 116, in from_run_results
    df.set_index('run-id', inplace=True)
  File "/home/appuser/venv/lib/python3.9/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
  File "/home/appuser/venv/lib/python3.9/site-packages/pandas/core/frame.py", line 5503, in set_index
    raise KeyError(f"None of {missing} are in the columns")
KeyError: "None of ['run-id'] are in the columns"

Please ignore. This has been resolved.

2 Likes