OpenBB-finance/OpenBB · warning · EmptyDataError

No data was returned for any symbol

Error message

No data was returned for any symbol

What it means

Finviz key metrics raises EmptyDataError('No data was returned for any symbol') when the per-symbol loop yields nothing and, unlike the messages case, no per-symbol errors were recorded. The request succeeded but each symbol silently returned an empty payload.

Source

Thrown at openbb_platform/providers/finviz/openbb_finviz/models/key_metrics.py:284

                        else None
                    ),
                }
            )

            return result

        symbols = query.symbol.split(",")

        for symbol in symbols:
            result = get_one(symbol)
            if result is not None and result:
                results.append(result)

        if not results and messages:
            raise OpenBBError("\n".join(messages))

        if not results and not messages:
            raise EmptyDataError("No data was returned for any symbol")

        if results and messages:
            for message in messages:
                warn(message)

        return results

    @staticmethod
    def transform_data(
        query: FinvizKeyMetricsQueryParams,
        data: list[dict],
        **kwargs: Any,
    ) -> list[FinvizKeyMetricsData]:
        """Transform and validate the raw data."""
        return [FinvizKeyMetricsData.model_validate(d) for d in data]

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Sanitize the symbol list (strip, drop empties) before querying
  2. Test a single well-known ticker (AAPL) to confirm the provider works, then bisect your list
  3. Handle EmptyDataError as 'no coverage' rather than retrying blindly

Example fix

# before
await obb.equity.fundamental.metrics(provider="finviz", symbol=",,, ")  # EmptyDataError

# after
symbols = ",".join(s.strip() for s in raw.split(",") if s.strip())
await obb.equity.fundamental.metrics(provider="finviz", symbol=symbols)
Defensive patterns

Strategy: try-catch

Validate before calling

symbols = [s.strip() for s in raw.split(",") if s.strip()]
assert symbols, "no usable symbols supplied"

Try / catch

from openbb_core.provider.abstract.errors import EmptyDataError

try:
    results = await FinvizKeyMetricsFetcher.transform_query(...)
except EmptyDataError:
    results = []  # silent empty: coverage gap on Finviz

Prevention

When it happens

Trigger: All tickers in the list resolve but have no metrics data on Finviz; empty/whitespace symbol strings after splitting; a Finviz page-layout change making the parser return None without erroring.

Common situations: Recently added or OTC tickers with sparse Finviz coverage; passing a symbol string of only commas.

Related errors


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