{"record":{"id":"e2031603139b0140","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-for-query-symbol-for-year-query-y","errorCode":null,"errorMessage":"No data found for {query.symbol} for year {query.year} and period {query.quarter}.","messagePattern":"No data found for (.+?) for year (.+?) and period (.+?)\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/fmp/openbb_fmp/models/earnings_call_transcript.py","lineNumber":150,"sourceCode":"            \"https://financialmodelingprep.com/stable/earning-call-transcript?symbol=\"\n            + f\"{query.symbol.upper()}&year={year}&quarter={quarter}&apikey={api_key}\"\n        )\n\n        try:\n            return await get_data_one(url, **kwargs)\n        except ValueError as e:\n            raise OpenBBError(\n                f\"No transcript found for {query.symbol} in {year} Q{quarter}\"\n                f\". \\n Latest available transcript is {df_dates.iloc[0].fiscalYear} Q{df_dates.iloc[0].quarter}.\"\n            ) from e\n\n    @staticmethod\n    def transform_data(\n        query: FMPEarningsCallTranscriptQueryParams, data: dict, **kwargs: Any\n    ) -> FMPEarningsCallTranscriptData:\n        \"\"\"Return the transformed data.\"\"\"\n        if not data:\n            raise OpenBBError(\n                ValueError(\n                    f\"No data found for {query.symbol} for year {query.year} and period {query.quarter}.\"\n                )\n            )\n        transcript = data.get(\"content\", \"\")\n\n        output_lines: list = []\n        intro_lines = f\"\"\"\n## {data.get(\"symbol\")} - {data.get(\"year\")} {data.get(\"period\")} Earnings Call Transcript - {data.get(\"date\")}\n\\n\\n\n\"\"\"\n        output_lines.append(intro_lines + \"\\n\\n\")\n        for line in transcript.splitlines():\n            section_title = line.split(\":\", 1)[0] if \":\" in line else \"\"\n            section_line = line.split(\":\", 1)[1] if \":\" in line else \"\"\n            if section_title and section_line:\n                output_lines.append(f\"### **{section_title.strip()}**:\" + \"\\n\\n\")\n                output_lines.append(section_line.strip() + \"\\n\\n\")","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fmp/openbb_fmp/models/earnings_call_transcript.py#L132-L168","documentation":"Raised as OpenBBError (wrapping ValueError) by FMPEarningsCallTranscript.transform_data when the dict passed from a_url is falsy. This is a defensive backstop: normally a_url already fails at error 407, so hitting 408 means the fetch returned something empty/None that slipped through.","triggerScenarios":"Calling earnings_transcript and receiving an empty dict from the fetch layer - e.g. FMP returned a 200 with an empty object, or a pipeline/mocking layer injected empty data between fetch and transform.","commonSituations":"Edge-case upstream payloads (200 with empty body), unit tests stubbing the fetch with {}, or changes in FMP response shape after an API revision.","solutions":["Re-run the exact call - if reproducible, inspect the raw FMP URL for that symbol/year/quarter to see the payload shape","Update the openbb_fmp package (pip install -U openbb-fmp) in case FMP changed its response contract and the provider was patched","If writing tests/mocks, ensure the stubbed response includes a non-empty dict with 'content'","Catch OpenBBError and surface the symbol/year/quarter context to the user"],"exampleFix":"# before (mock returns empty)\nmock_fetch.return_value = {}\n\n# after\nmock_fetch.return_value = {\"symbol\": \"AAPL\", \"year\": 2025, \"period\": \"Q2\", \"date\": \"2025-05-01\", \"content\": \"...\"}","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"def is_transcript_payload(d: dict) -> bool:\n    return bool(d) and isinstance(d.get('content'), str) and len(d['content']) > 0","tryCatchPattern":"from openbb_core.provider.utils.errors import OpenBBError\ntry:\n    t = await obb.equity.earnings_transcript.async_(symbol=sym, provider='fmp')\nexcept OpenBBError as e:\n    if 'No data found for' in str(e):\n        log.warning('Empty transcript payload for %s; upstream shape change?', sym)\n    raise","preventionTips":["Pin and update the openbb-fmp package when FMP revises response shapes","In tests, stub transcript fetches with realistic non-empty dicts","Retry once on empty-payload errors; usually transient"],"tags":["fmp","earnings-transcript","empty-data","defensive"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}