{"record":{"id":"9a623b3978bca257","repo":"OpenBB-finance/OpenBB","slug":"no-data-to-process","errorCode":null,"errorMessage":"No data to process!","messagePattern":"No data to process!","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/extensions/derivatives/openbb_derivatives/options/options_router.py","lineNumber":147,"sourceCode":"        - `ytitle`: Title for the y-axis.\n        - `ztitle`: Title for the z-axis.\n        - `colorscale`: The colorscale to use for the chart.\n        - `layout_kwargs`: Additional dictionary to be passed to `fig.update_layout` before output.\n\n    Returns\n    -------\n    OBBject[list]\n        An OBBject containing the processed options data.\n        Results are a list of dictionaries.\n    \"\"\"\n    # pylint: disable=import-outside-toplevel\n    from datetime import datetime  # noqa\n    from pandas import concat, DataFrame\n\n    df = DataFrame()\n\n    if not data:\n        raise OpenBBError(\"No data to process!\")\n\n    if isinstance(data, OptionsChainsData):\n        df = data.dataframe\n    elif isinstance(data, DataFrame):\n        df = data\n    elif isinstance(data, dict) and all(isinstance(v, list) for v in data.values()):\n        df = DataFrame(data)\n    elif isinstance(data, list):\n        if all(isinstance(d, dict) for d in data):\n            df = DataFrame(data)\n        elif all(isinstance(d, Data) for d in data):\n            df = DataFrame([d.model_dump(exclude_none=True, exclude_unset=True) for d in data])  # type: ignore\n\n    options = DataFrame(df.copy())\n\n    last_price = underlying_price or options.underlying_price.iloc[0]  # type: ignore\n\n    if last_price is None:","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/extensions/derivatives/openbb_derivatives/options/options_router.py#L129-L165","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the fetch step produced results before processing: if not data.results: handle empty case.","Validate the symbol has listed options with the provider (obb.derivatives.options.chains('SYM')).","Retry after verifying API keys/rate limits for the provider in use.","Keep the pipeline short-circuited on empty inputs rather than forwarding empty payloads."],"exampleFix":"# before\nres = process_options(data=[], target='volume')  # raises\n\n# after\nif not data:\n    raise SystemExit('no options data returned by provider')\nres = process_options(data=data, target='volume')","handlingStrategy":"validation","validationCode":"if data is None or (hasattr(data, '__len__') and len(data) == 0):\n    raise ValueError('upstream fetch returned no options data')","typeGuard":null,"tryCatchPattern":"try:\n    processed = process_options(data=raw, target='volume')\nexcept OpenBBError as e:\n    if 'No data to process' in str(e):\n        processed = None  # treat as empty result, not an exception","preventionTips":["Short-circuit your pipeline on empty fetch results.","Log the symbol/provider whenever the fetcher returns nothing so empties are diagnosable."],"tags":["openbb","options","empty-data","validation"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}