OpenBB-finance/OpenBB · error · ValueError
Only one table can be requested at a time. Got: {tables}
Error message
Only one table can be requested at a time. Got: {tables} What it means
Error "Only one table can be requested at a time. Got: {tables}" thrown in OpenBB-finance/OpenBB.
Source
Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:371
hierarchy_ids = {h.get("id") for h in hierarchies}
if identifier in hierarchy_ids:
is_table = True
except Exception: # noqa
pass # If we can't check, assume it's an indicator
if is_table:
tables.append(sym)
else:
indicators.append((dataflow, identifier))
if tables and indicators:
raise ValueError(
"Cannot mix tables and indicators in the same request. "
f"Got tables: {tables} and indicators: {[f'{d}::{c}' for d, c in indicators]}"
)
if len(tables) > 1:
raise ValueError(
f"Only one table can be requested at a time. Got: {tables}"
)
if tables:
self._is_table = True
parts = tables[0].split("::", 1)
self._dataflow = parts[0].upper()
self._table_id = parts[1]
else:
self._is_table = False
indicators_by_df: dict[str, list[str]] = {}
for dataflow, code in indicators:
if dataflow not in indicators_by_df:
indicators_by_df[dataflow] = []
indicators_by_df[dataflow].append(code)
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Request only one table per call.
- Split multiple table requests into separate calls.
When it happens
Trigger: Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:371 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/79db270ee338e1d0.
Report an issue: GitHub.