OpenBB-finance/OpenBB · warning · EmptyDataError
No data found for the given symbols.
Error message
No data found for the given symbols.
What it means
Raised as EmptyDataError by FMPEsgScore.a_url: ESG disclosures are fetched per symbol; each symbol with no data only warns ('Symbol Error: No data found for X'). Only when every requested symbol returned nothing does the aggregated empty results list trigger this error.
Source
Thrown at openbb_platform/providers/fmp/openbb_fmp/models/esg_score.py:73
api_key = credentials.get("fmp_api_key") if credentials else ""
symbols = query.symbol.split(",")
results: list = []
async def get_one(symbol):
"""Get data for one symbol."""
url = f"https://financialmodelingprep.com/stable/esg-disclosures?symbol={symbol}&apikey={api_key}"
result = await get_data(url, **kwargs)
if not result:
warnings.warn(f"Symbol Error: No data found for {symbol}")
elif result:
results.extend(result)
await asyncio.gather(*[get_one(symbol) for symbol in symbols])
if not results:
raise EmptyDataError("No data found for the given symbols.")
return sorted(results, key=lambda x: x.get("date", ""), reverse=True)
@staticmethod
def transform_data(
query: FMPEsgScoreQueryParams, data: list, **kwargs: Any
) -> list[FMPEsgScoreData]:
"""Return the transformed data."""
return [FMPEsgScoreData.model_validate(d) for d in data]
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Test one large-cap symbol (e.g. AAPL) alone - if that is also empty, the problem is key/plan, not symbol choice
- Remove symbols that only produced warnings and retry the remainder
- Confirm the FMP subscription includes ESG disclosures
- Catch EmptyDataError and treat ESG as unavailable for the universe rather than failing the pipeline
Example fix
# before
res = obb.equity.esg(symbol='FOO,BAR', provider='fmp') # no ESG coverage -> EmptyDataError
# after
from openbb_core.provider.utils.errors import EmptyDataError
try:
res = obb.equity.esg(symbol='AAPL,MSFT', provider='fmp')
except EmptyDataError:
res = None # ESG unavailable for this universe Defensive patterns
Strategy: try-catch
Validate before calling
# probe ESG availability with one covered large cap
probe = obb.equity.esg(symbol='AAPL', provider='fmp').results
if not probe:
raise RuntimeError('FMP ESG unavailable for this key; check plan tier') Type guard
null
Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
res = await obb.equity.esg.async_(symbol=','.join(symbols), provider='fmp')
except EmptyDataError:
res = [] # ESG not available for this universe Prevention
- Probe ESG coverage once with a liquid ticker to validate plan access
- Expect sparse coverage outside large caps; design pipelines to skip missing ESG
- Log per-symbol warnings to separate coverage gaps from key issues
When it happens
Trigger: Calling obb.equity.esg(symbol=..., provider='fmp') where none of the symbols have ESG disclosure data on FMP - typical for small caps, non-covered tickers, or a key/plan without ESG access (each call then returns empty).
Common situations: ESG being a premium FMP dataset missing from the caller's plan, screening universes of small/mid caps with sparse ESG coverage, delisted tickers, or expecting older providers' ESG coverage breadth.
Related errors
- No data found for the given symbols.
- No data found for the given symbols.
- No data returned for the given symbols.
- The request was returned empty.
- No data found for the given query -> {query.model_dump()}
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/5a6b202a16e89b34.
Report an issue: GitHub.