OpenBB-finance/OpenBB · error · ValueError
Country is required. Provide via 'country' parameter or incl
Error message
Country is required. Provide via 'country' parameter or include a country dimension (COUNTRY, REF_AREA, JURISDICTION, AREA) in 'dimension_values'.
What it means
Error "Country is required. Provide via 'country' parameter or include a country dimension (COUNTRY, REF_AREA, JURISDICTION, AREA) in 'dimension_values'." thrown in OpenBB-finance/OpenBB.
Source
Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:313
elif dim_id_upper in frequency_dimensions:
object.__setattr__(self, "frequency", dim_value)
# dimension_values OVERRIDES the transform parameter
elif dim_id_upper in transform_dimensions:
object.__setattr__(self, "transform", dim_value)
# Keep dimension_values that are not consumed by country/frequency/transform
else:
remaining_dimension_values.append(dv)
# Update dimension_values to only contain non-consumed dimensions
object.__setattr__(
self,
"dimension_values",
remaining_dimension_values if remaining_dimension_values else None,
)
# Validate country requirement - must have country by now
if not self.country:
raise ValueError(
"Country is required. Provide via 'country' parameter or include a country "
"dimension (COUNTRY, REF_AREA, JURISDICTION, AREA) in 'dimension_values'."
)
symbols = [
s.strip()
for s in self.symbol.split(",") # type: ignore # pylint: disable=E1101
]
tables: list[str] = []
indicators: list[tuple[str, str]] = []
dataflows_seen: set[str] = set()
for sym in symbols:
if "::" not in sym:
raise ValueError(
f"Invalid symbol format '{sym}'. Expected 'dataflow::identifier'. "
"Use `available_indicators()` or `list_tables()` to find valid symbols."
)View on GitHub (pinned to 3e071fcc2c)
Solutions
- Provide the country parameter or include a country dimension in dimension_values.
- Use a valid IMF country code (ISO3) or name.
When it happens
Trigger: Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:313 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/4e89841c2eb8cd88.
Report an issue: GitHub.