{"record":{"id":"80db0dcb8aed62c4","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-for-the-given-symbols-80db0d","errorCode":null,"errorMessage":"No data found for the given symbols.","messagePattern":"No data found for the given symbols\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/fmp/openbb_fmp/models/etf_countries.py","lineNumber":83,"sourceCode":"                for row in result:\n                    row_weight = row.get(\"weightPercentage\", \"0%\").replace(\"%\", \"\")\n                    if not row_weight or row_weight == \"0\":\n                        continue\n                    new_row = {\n                        \"symbol\": symbol,\n                        \"country\": row[\"country\"],\n                        \"weight\": float(row_weight) * 0.01,\n                    }\n                    new_data.append(new_row)\n\n                if new_data:\n                    results.extend(new_data)\n            return\n\n        await asyncio.gather(*[get_one(symbol) for symbol in symbols])\n\n        if not results:\n            raise EmptyDataError(\"No data found for the given symbols.\")\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: FMPEtfCountriesQueryParams, data: list, **kwargs: Any\n    ) -> list[FMPEtfCountriesData]:\n        \"\"\"Return the transformed data.\"\"\"\n        symbols = query.symbol.split(\",\")\n\n        return [\n            FMPEtfCountriesData.model_validate(d)\n            for d in sorted(\n                data,\n                key=lambda x: (\n                    symbols.index(x.get(\"symbol\", len(symbols))),\n                    -(x.get(\"weightPercentage\", 0) or 0),\n                ),","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fmp/openbb_fmp/models/etf_countries.py#L65-L101","documentation":"Raised as EmptyDataError by FMPEtfCountries.a_url: country-exposure data is fetched per ETF symbol; symbols whose response has no rows are skipped silently (only processed rows are appended). If, after gathering all symbols, 'results' is still empty, this error is raised - i.e. no requested ETF returned any country-weight rows.","triggerScenarios":"Calling obb.etf.countries(symbol=..., provider='fmp') where every symbol fails - non-ETF symbols (stocks), ETFs FMP has no country breakdown for, or an API key without access to the country-exposure endpoint.","commonSituations":"Passing equity tickers where ETFs are expected, thinly-covered or new ETFs lacking exposure data on FMP, key/plan restrictions returning empty payloads, or delisted ETFs.","solutions":["Verify each symbol is actually an ETF (check via obb.etf.profile) before calling","Test a major ETF like SPY or VOO alone to distinguish coverage gaps from key/plan issues","Remove failing symbols (those contributing no rows) and retry the remainder","Catch EmptyDataError and report 'no country exposure data available for these symbols'"],"exampleFix":"# before\nres = obb.etf.countries(symbol='AAPL,MSFT', provider='fmp')  # stocks, not ETFs -> EmptyDataError\n\n# after\nres = obb.etf.countries(symbol='SPY,VOO', provider='fmp')","handlingStrategy":"validation","validationCode":"# confirm symbols are ETFs before requesting country exposure\nprofile = obb.etf.profile(symbol=sym, provider='fmp').results\nif not profile:\n    raise ValueError(f'{sym} is not a known ETF on FMP')","typeGuard":"def looks_like_etf_symbol_list(symbols: list[str], etf_universe: set[str]) -> bool:\n    return all(s in etf_universe for s in symbols)","tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\ntry:\n    res = await obb.etf.countries.async_(symbol=','.join(symbols), provider='fmp')\nexcept EmptyDataError:\n    res = []  # no country-exposure data for any requested ETF","preventionTips":["Pass only ETF tickers (verify with etf.profile) to etf.countries","Probe coverage with SPY/VOO to distinguish key issues from coverage gaps","Treat empty country exposure as missing data, not an error, in portfolio analytics"],"tags":["fmp","empty-data","etf","countries","coverage"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}