OpenBB-finance/OpenBB · error · OpenBBError

No data to process!

Error message

No data to process!

What it means

Raised by the options processing/filtering helper in openbb_derivatives/options/options_router.py when the incoming data argument is falsy - an empty list, None, or empty dict. The router function (used by endpoints like options chains processing/filtering) refuses to build a DataFrame from nothing before attempting any filtering.

Source

Thrown at openbb_platform/extensions/derivatives/openbb_derivatives/options/options_router.py:147

        - `ytitle`: Title for the y-axis.
        - `ztitle`: Title for the z-axis.
        - `colorscale`: The colorscale to use for the chart.
        - `layout_kwargs`: Additional dictionary to be passed to `fig.update_layout` before output.

    Returns
    -------
    OBBject[list]
        An OBBject containing the processed options data.
        Results are a list of dictionaries.
    """
    # pylint: disable=import-outside-toplevel
    from datetime import datetime  # noqa
    from pandas import concat, DataFrame

    df = DataFrame()

    if not data:
        raise OpenBBError("No data to process!")

    if isinstance(data, OptionsChainsData):
        df = data.dataframe
    elif isinstance(data, DataFrame):
        df = data
    elif isinstance(data, dict) and all(isinstance(v, list) for v in data.values()):
        df = DataFrame(data)
    elif isinstance(data, list):
        if all(isinstance(d, dict) for d in data):
            df = DataFrame(data)
        elif all(isinstance(d, Data) for d in data):
            df = DataFrame([d.model_dump(exclude_none=True, exclude_unset=True) for d in data])  # type: ignore

    options = DataFrame(df.copy())

    last_price = underlying_price or options.underlying_price.iloc[0]  # type: ignore

    if last_price is None:

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Check the fetch step produced results before processing: if not data.results: handle empty case.
  2. Validate the symbol has listed options with the provider (obb.derivatives.options.chains('SYM')).
  3. Retry after verifying API keys/rate limits for the provider in use.
  4. Keep the pipeline short-circuited on empty inputs rather than forwarding empty payloads.

Example fix

# before
res = process_options(data=[], target='volume')  # raises

# after
if not data:
    raise SystemExit('no options data returned by provider')
res = process_options(data=data, target='volume')
Defensive patterns

Strategy: validation

Validate before calling

if data is None or (hasattr(data, '__len__') and len(data) == 0):
    raise ValueError('upstream fetch returned no options data')

Try / catch

try:
    processed = process_options(data=raw, target='volume')
except OpenBBError as e:
    if 'No data to process' in str(e):
        processed = None  # treat as empty result, not an exception

Prevention

When it happens

Trigger: Calling the options processing endpoint/helper with data=[] - typically because the upstream fetcher returned no results for the symbol/provider, or the caller passed an empty DataFrame-less structure after filtering out everything.

Common situations: Unknown or delisted optionable symbol; provider returned an empty snapshot (rate-limited or market closed); caller-side pre-filtering that removed all rows before handing data to the router.

Related errors


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