{"record":{"id":"f058cc02520a0fbd","repo":"OpenBB-finance/OpenBB","slug":"no-data-found","errorCode":null,"errorMessage":"No data found.","messagePattern":"No data found\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/alpha_vantage/openbb_alpha_vantage/models/historical_eps.py","lineNumber":163,"sourceCode":"            if not data:\n                warn(f\"Symbol Error: No data found for {symbol}\")\n\n        await amake_requests(urls, response_callback, **kwargs)  # type: ignore\n\n        if not results:\n            raise EmptyDataError(f\"No data was returned -> \\n{messages[-1]}\")\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: AlphaVantageHistoricalEpsQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[AlphaVantageHistoricalEpsData]:\n        \"\"\"Transform the raw data into the standard model.\"\"\"\n        if not data:\n            raise EmptyDataError(\"No data found.\")\n        return [AlphaVantageHistoricalEpsData.model_validate(d) for d in data]\n","sourceCodeStart":145,"sourceCodeEnd":165,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/alpha_vantage/openbb_alpha_vantage/models/historical_eps.py#L145-L165","documentation":"AlphaVantageHistoricalEpsFetcher.transform_data (historical_eps.py:163) is the standard OpenBB fetcher stage that converts raw dicts into AlphaVantageHistoricalEpsData models; if the list handed to it is empty it raises EmptyDataError(\"No data found.\"). Normally a_fetch_data already guards empties, so seeing this means transform_data was called directly with [] or data was dropped between stages.","triggerScenarios":"Calling the fetcher's transform_data(query, []) directly (unit tests, custom pipelines), or wiring a fetcher result where the data list was filtered to nothing.","commonSituations":"Test fixtures that pass empty lists; custom router code that slices provider output to [] before transform; provider responses whose 'annualReports' arrays are all empty so an intermediate filter yields [].","solutions":["Check for empty data before calling transform: if not data: return [].","In tests, supply at least one well-formed report dict matching AlphaVantageHistoricalEpsData fields.","Avoid slicing/filtering between a_fetch_data and transform_data without re-checking emptiness.","Catch EmptyDataError where the pipeline runs and map it to an empty result set."],"exampleFix":"# before\nrows = AlphaVantageHistoricalEpsFetcher.transform_data(query, [])  # EmptyDataError: No data found.\n\n# after\nrows = AlphaVantageHistoricalEpsFetcher.transform_data(query, data) if data else []","handlingStrategy":"validation","validationCode":"if not data:\n    return []\nrows = AlphaVantageHistoricalEpsFetcher.transform_data(query, data)","typeGuard":"def has_reports(data: list[dict]) -> bool:\n    return bool(data) and any(\"fiscalDateEnding\" in row or \"annualReports\" in row for row in data)","tryCatchPattern":"from openbb_core.provider.standard_models.errors import EmptyDataError\ntry:\n    rows = AlphaVantageHistoricalEpsFetcher.transform_data(query, data)\nexcept EmptyDataError:\n    rows = []","preventionTips":["Guard transform_data calls with an emptiness check.","Give test fixtures at least one realistic report dict.","Don't filter provider output between fetch and transform without re-checking emptiness."],"tags":["python","openbb","alpha-vantage","provider","empty-data"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}