OpenBB-finance/OpenBB · error · ValueError
Invalid value(s) for dimension 'frequency': ['{freq_val}'].
Error message
Invalid value(s) for dimension 'frequency': ['{freq_val}']. Given prior selections {{'country': '{self.country}', 'indicator': '{indicator_str}'}}, available values are: {available_freqs} What it means
Error "Invalid value(s) for dimension 'frequency': ['{freq_val}']. Given prior selections {{'country': '{self.country}', 'indicator': '{indicator_str}'}}, available values are: {available_freqs}" thrown in OpenBB-finance/OpenBB.
Source
Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:522
]
if invalid:
raise ValueError(
f"Invalid value(s) for dimension 'country': {invalid}. "
+ f"Given prior selections {{'indicator': '{','.join(indicator_codes)}'}}, "
+ f"available values are: {sorted(available_countries)}"
)
if (
self.frequency
and self.frequency.lower() not in ("all", "*") # type: ignore # pylint: disable=E1101
and freq_dim in dim_order
):
freq_map = {"annual": "A", "quarter": "Q", "month": "M", "day": "D"}
freq_val = freq_map.get(str(self.frequency).lower(), self.frequency)
available_freqs = get_available_values(freq_dim, dataflow_id)
if available_freqs and freq_val not in available_freqs:
indicator_str = ",".join(indicator_codes)
raise ValueError(
f"Invalid value(s) for dimension 'frequency': ['{freq_val}']. "
f"Given prior selections {{'country': '{self.country}', "
f"'indicator': '{indicator_str}'}}, "
f"available values are: {available_freqs}"
)
# Validate transform (skip if 'all' or '*')
if (
self.transform
and self.transform.lower() not in ("all", "*") # type: ignore # pylint: disable=E1101
and transform_dim
and transform_dim in dim_order
):
_, _, transform_lookup, unit_lookup = detect_transform_dimension(
dataflow_id
)
# Resolve user-friendly name to code
transform_val = self.transform.strip().lower() # type: ignore # pylint: disable=E1101View on GitHub (pinned to 3e071fcc2c)
Solutions
- Choose a frequency from the listed available values.
- Adjust the country or indicator selection if the desired frequency is unavailable.
When it happens
Trigger: Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:522 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/bc917127a47c4563.
Report an issue: GitHub.