OpenBB-finance/OpenBB · warning · EmptyDataError
All requests returned empty with no error messages.
Error message
All requests returned empty with no error messages.
What it means
EmptyDataError raised when options chain extraction finished with zero results AND zero error messages — every per-expiration websocket task either returned nothing or raised an exception that asyncio.gather(return_exceptions=True) swallowed silently. It means the fetch 'succeeded' mechanically but yielded no data and no diagnosable error.
Source
Thrown at openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py:241
if len(received_symbols) == len(symbols):
await websocket.close()
break
tasks = [
asyncio.create_task(call_api(expiration)) for expiration in symbols_dict
]
await asyncio.gather(*tasks, return_exceptions=True)
if messages and not results:
raise OpenBBError(", ".join(messages))
if results and messages:
for message in messages:
warn(message)
if not results and not messages:
raise EmptyDataError("All requests returned empty with no error messages.")
return results
@staticmethod
def transform_data(
query: DeribitOptionsChainsQueryParams,
data: list[dict],
**kwargs: Any,
) -> DeribitOptionsChainsData:
"""Transform the data."""
# pylint: disable=import-outside-toplevel
from numpy import nan
from pandas import DataFrame
df = DataFrame(data)
# For BTC and ETH options, we need to convert price units to USD.
for col in df.columns:View on GitHub (pinned to 3e071fcc2c)
Solutions
- Confirm options actually exist for the symbol via get_instruments(currency, 'option').
- Check the installed `websockets` package version — the code imports websockets.asyncio.client (v13+ layout); upgrade if imports fail inside tasks.
- Retry once; transient empty gathers are common under load.
- If it persists, temporarily call get_options_symbols(symbol) directly to see the expiry map the fetcher used.
Example fix
# before
# silently swallowed task exceptions make this fire with no clue
res = obb.derivatives.options.chains(symbol="XRP", provider="deribit")
# after
# diagnose the expiry map first
from openbb_deribit.utils.helpers import get_options_symbols
expiries = await get_options_symbols("XRP") # empty dict -> no options listed Defensive patterns
Strategy: try-catch
Validate before calling
from openbb_deribit.utils.helpers import get_options_symbols
expiries = asyncio.run(get_options_symbols(sym.upper()))
if not expiries:
raise SystemExit(f"no options currently listed for {sym}; nothing to fetch") Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
chains = obb.derivatives.options.chains(symbol=sym, provider="deribit")
except EmptyDataError:
chains = None # all tasks silently empty; verify websockets version + listing Prevention
- Pin/verify a modern `websockets` package version — connect failures are swallowed by gather(return_exceptions=True).
- Pre-check that get_options_symbols returns a non-empty expiry map.
- Treat this error as a diagnosable 'silent gather' signal, not a clean empty.
When it happens
Trigger: symbols_dict was empty (no options listed for the underlying at that moment), or every call_api task raised before depositing a message (e.g. KeyError on symbols_dict[expiration] or websocket connect failures that bypass the message set). gather with return_exceptions=True hides these exceptions entirely.
Common situations: Querying an underlying whose option listing is momentarily empty, or websocket library version incompatibilities (websockets package API changes) that make every connect fail silently.
Related errors
- , ".join(messages)
- No data found.
- No data found for the given symbol(s).
- Invalid Deribit symbol. Supported symbols are: {', '.join(DE
- OpenBBError(e) from e
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/112a2182a2de71fd.
Report an issue: GitHub.