OpenBB-finance/OpenBB · error · OpenBBError
No indicators specified.
Error message
No indicators specified.
What it means
Raised in the multi-indicator code path of the IMF economic_indicators fetcher when `query._indicators_by_dataflow` resolves to an empty mapping. The fetcher splits the `indicator` parameter into per-dataflow code groups; if the parameter was omitted, blank, or normalized away to nothing, there is nothing to query and it raises immediately rather than issuing a meaningless request.
Source
Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:821
return {
"mode": "table",
"data": result.get("data", []),
"table_metadata": result.get("table_metadata", {}),
"series_metadata": result.get("series_metadata", {}),
}
except (ValueError, OpenBBError) as e:
# Translate IMF dimension codes to user-friendly parameter names
raise OpenBBError(translate_error_message(str(e))) from e
else:
# Indicator mode: support multiple dataflows
query_builder = ImfQueryBuilder()
all_data: list[dict] = []
all_metadata: dict = {}
indicators_by_df = query._indicators_by_dataflow
if not indicators_by_df:
raise OpenBBError("No indicators specified.")
# Fetch data for each dataflow
for dataflow, indicator_codes in indicators_by_df.items():
params = {
"COUNTRY": countries_str,
"FREQUENCY": frequency,
}
# Apply user-specified dimension filters
if extra_dimensions:
params.update(extra_dimensions)
# Handle transform/unit parameter per dataflow
if query.transform:
transform_val = query.transform.strip().lower()
transform_dim, unit_dim, transform_lookup, unit_lookup = (
detect_transform_dimension(dataflow)
)View on GitHub (pinned to 3e071fcc2c)
Solutions
- Pass at least one valid indicator code, e.g. `indicator='NGDP_RPCH'` or a comma-separated list.
- If you intended the table mode, set the `table` parameter instead of relying on `indicator`.
- Debug-print `query._indicators_by_dataflow` before fetching to confirm your indicator string parses into dataflow groups.
Example fix
# before res = await obb.economy.imf.economic_indicators() # indicator missing # after res = await obb.economy.imf.economic_indicators(indicator='NGDP_RPCH')
Defensive patterns
Strategy: validation
Validate before calling
if not indicator or not indicator.strip():
raise ValueError('indicator is required for indicator mode')
# if you intend table mode, pass table= instead Type guard
def has_indicators(q) -> bool:
return bool(getattr(q, '_indicators_by_dataflow', None)) Prevention
- Assert required parameters at your API boundary before building provider queries
- Distinguish table mode (table=) from indicator mode (indicator=) explicitly
When it happens
Trigger: Calling `ImfEconomicIndicatorsQueryParams`-driven fetch with no `indicator` (and not in table mode), an empty string `indicator=''`, or an indicator string that the parsing helper reduces to an empty dict. Also reachable if `query._indicators_by_dataflow` is unset because the field was bypassed via direct construction.
Common situations: Building the query programmatically and forgetting to set `indicator`; passing an empty list from a variable that was supposed to be populated upstream; copy-pasting a table-mode call (which uses `table=`) while removing the table argument.
Related errors
- Invalid transform value '{query.transform}' for dataflow '{d
- Invalid chokepoint name: {chokepoint} -> Expected one of {li
- Invalid chokepoint name: {v} -> Expected one of {list(CHOKEP
- Invalid port_code: {item}. Must be a valid port ID or name.A
- No valid port_code provided.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/701ca7b35355d8d5.
Report an issue: GitHub.