OpenBB-finance/OpenBB · error · OpenBBError
Period '{query.period}' not supported.
Error message
Period '{query.period}' not supported. What it means
OpenBBError raised in the income statement fetcher's aextract_data when query.period is not one of 'quarter', 'annual', 'ttm', 'ytd'. The period must be mapped to an Intrinio statement period type (FY/QTR/TTM/YTD); anything else cannot be translated, so the fetch aborts before any request is made.
Source
Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py:410
def transform_query(params: dict[str, Any]) -> IntrinioIncomeStatementQueryParams:
"""Transform the query params."""
return IntrinioIncomeStatementQueryParams(**params)
@staticmethod
async def aextract_data(
query: IntrinioIncomeStatementQueryParams,
credentials: dict[str, str] | None,
**kwargs: Any,
) -> list[dict]:
"""Return the raw data from the Intrinio endpoint."""
api_key = credentials.get("intrinio_api_key") if credentials else ""
statement_code = "income_statement"
if query.period in ["quarter", "annual"]:
period_type = "FY" if query.period == "annual" else "QTR"
elif query.period in ["ttm", "ytd"]:
period_type = query.period.upper()
else:
raise OpenBBError(f"Period '{query.period}' not supported.")
data_tags = [
"ebit",
"ebitda",
"ebitdamargin",
"pretaxincomemargin",
"grossmargin",
]
fundamentals_data: dict = {}
base_url = "https://api-v2.intrinio.com"
fundamentals_url = (
f"{base_url}/companies/{query.symbol}"
f"/fundamentals?statement_code={statement_code}&type={period_type}"
)
if query.fiscal_year is not None:View on GitHub (pinned to 3e071fcc2c)
Solutions
- Use one of: period='quarter', 'annual', 'ttm', or 'ytd'.
- Normalize input before calling: strip and lowercase, map 'quarterly'->'quarter', 'yearly'/'fy'->'annual'.
- If you believe the value is valid, update openbb-intrinio - the fetcher mapping may lag the accepted params.
Example fix
# before
obb.equity.fundamental.income(symbol='AAPL', provider='intrinio', period='quarterly')
# after
period = {'quarterly': 'quarter', 'yearly': 'annual'}.get(user_period, user_period)
obb.equity.fundamental.income(symbol='AAPL', provider='intrinio', period=period) Defensive patterns
Strategy: validation
Validate before calling
ALLOWED = {'quarter', 'annual', 'ttm', 'ytd'}
period = str(period).strip().lower()
ALIASES = {'quarterly': 'quarter', 'yearly': 'annual', 'fy': 'annual', 'q': 'quarter'}
period = ALIASES.get(period, period)
assert period in ALLOWED, f"period must be one of {ALLOWED}, got {period!r}" Type guard
def is_valid_intrinio_period(p: str) -> bool:
return str(p).strip().lower() in {'quarter', 'annual', 'ttm', 'ytd'} Try / catch
from openbb_core.provider.exceptions import OpenBBError
try:
res = obb.equity.fundamental.income(symbol=sym, provider='intrinio', period=period)
except OpenBBError as e:
if 'not supported' in str(e):
raise ValueError(str(e)) from e
raise Prevention
- Normalize period strings before passing them in
- Map other providers' vocabulary ('quarterly', 'fy') to intrinio's
- Pin the QueryParams enum and fetcher mapping to the same provider version
When it happens
Trigger: Calling the income statement router with provider='intrinio' and a period value outside the allowed set - e.g. period='monthly', 'semi-annual', 'ytd quarterly', or a typo like 'anual'. Normally the QueryParams validation blocks this first, so hitting this branch means a non-validated or programmatically-injected value.
Common situations: Passing a period string from another provider's vocabulary (e.g. 'quarterly' with -ly suffix) to intrinio; dynamic parameter construction from user input without normalization; version drift where the QueryParams enum widened beyond what the fetcher maps.
Related errors
- [Error] -> {error_str}
- A query is required for search_type 'full_text' or 'series_i
- No valid port_code provided.
- Country value cannot be empty.
- Country '{value}' is not a valid IMF country code or country
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/fa23afab743053e6.
Report an issue: GitHub.