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

  1. Test one large-cap symbol (e.g. AAPL) alone - if that is also empty, the problem is key/plan, not symbol choice
  2. Remove symbols that only produced warnings and retry the remainder
  3. Confirm the FMP subscription includes ESG disclosures
  4. 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

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


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/5a6b202a16e89b34. Report an issue: GitHub.