{"record":{"id":"fa23afab743053e6","repo":"OpenBB-finance/OpenBB","slug":"period-query-period-not-supported-fa23af","errorCode":null,"errorMessage":"Period '{query.period}' not supported.","messagePattern":"Period '(.+?)' not supported\\.","errorType":"validation","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py","lineNumber":410,"sourceCode":"    def transform_query(params: dict[str, Any]) -> IntrinioIncomeStatementQueryParams:\n        \"\"\"Transform the query params.\"\"\"\n        return IntrinioIncomeStatementQueryParams(**params)\n\n    @staticmethod\n    async def aextract_data(\n        query: IntrinioIncomeStatementQueryParams,\n        credentials: dict[str, str] | None,\n        **kwargs: Any,\n    ) -> list[dict]:\n        \"\"\"Return the raw data from the Intrinio endpoint.\"\"\"\n        api_key = credentials.get(\"intrinio_api_key\") if credentials else \"\"\n        statement_code = \"income_statement\"\n        if query.period in [\"quarter\", \"annual\"]:\n            period_type = \"FY\" if query.period == \"annual\" else \"QTR\"\n        elif query.period in [\"ttm\", \"ytd\"]:\n            period_type = query.period.upper()\n        else:\n            raise OpenBBError(f\"Period '{query.period}' not supported.\")\n\n        data_tags = [\n            \"ebit\",\n            \"ebitda\",\n            \"ebitdamargin\",\n            \"pretaxincomemargin\",\n            \"grossmargin\",\n        ]\n\n        fundamentals_data: dict = {}\n\n        base_url = \"https://api-v2.intrinio.com\"\n\n        fundamentals_url = (\n            f\"{base_url}/companies/{query.symbol}\"\n            f\"/fundamentals?statement_code={statement_code}&type={period_type}\"\n        )\n        if query.fiscal_year is not None:","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py#L392-L428","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\nobb.equity.fundamental.income(symbol='AAPL', provider='intrinio', period='quarterly')\n\n# after\nperiod = {'quarterly': 'quarter', 'yearly': 'annual'}.get(user_period, user_period)\nobb.equity.fundamental.income(symbol='AAPL', provider='intrinio', period=period)","handlingStrategy":"validation","validationCode":"ALLOWED = {'quarter', 'annual', 'ttm', 'ytd'}\nperiod = str(period).strip().lower()\nALIASES = {'quarterly': 'quarter', 'yearly': 'annual', 'fy': 'annual', 'q': 'quarter'}\nperiod = ALIASES.get(period, period)\nassert period in ALLOWED, f\"period must be one of {ALLOWED}, got {period!r}\"","typeGuard":"def is_valid_intrinio_period(p: str) -> bool:\n    return str(p).strip().lower() in {'quarter', 'annual', 'ttm', 'ytd'}","tryCatchPattern":"from openbb_core.provider.exceptions import OpenBBError\ntry:\n    res = obb.equity.fundamental.income(symbol=sym, provider='intrinio', period=period)\nexcept OpenBBError as e:\n    if 'not supported' in str(e):\n        raise ValueError(str(e)) from e\n    raise","preventionTips":["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"],"tags":["intrinio","income-statement","validation","parameters"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}