OpenBB-finance/OpenBB · error · OpenBBError
Please enter a country and frequency.
Error message
Please enter a country and frequency.
What it means
Error "Please enter a country and frequency." thrown in OpenBB-finance/OpenBB.
Source
Thrown at openbb_platform/providers/imf/openbb_imf/imf_router.py:707
bool,
Query(
title="Raw Output",
description="Return presentation table as raw JSON data if True.",
),
] = False,
) -> Any:
"""Get a formatted presentation table from the IMF database. Returns as HTML or JSON list."""
# pylint: disable=import-outside-toplevel
import html as html_module
from openbb_imf.models.economic_indicators import ImfEconomicIndicatorsFetcher
from pandas import DataFrame
if dataflow_group is None or table is None:
raise OpenBBError(ValueError("Please enter a dataflow group and a table."))
if country is None or frequency is None:
raise OpenBBError(ValueError("Please enter a country and frequency."))
freq_map = {"A": "annual", "Q": "quarter", "M": "month", "D": "day"}
symbol = PRESENTATION_TABLES.get(table, "")
params = {
"symbol": symbol,
"country": country,
"limit": limit,
"frequency": freq_map.get(frequency, frequency),
"dimension_values": dimension_values,
"pivot": True,
}
results = await ImfEconomicIndicatorsFetcher.fetch_data(params, {})
results_json = [d.model_dump(mode="json", exclude_none=True) for d in results.result] # type: ignore
if raw is True:
return results_json
df = DataFrame(results_json).set_index(["title", "country"]).reset_index()View on GitHub (pinned to 3e071fcc2c)
Solutions
- Provide both a country and a frequency parameter.
- Use a valid IMF country code and frequency ('A', 'Q', or 'M').
When it happens
Trigger: Thrown at openbb_platform/providers/imf/openbb_imf/imf_router.py:707 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/2d5d9fce552fef89.
Report an issue: GitHub.