{"record":{"id":"112a2182a2de71fd","repo":"OpenBB-finance/OpenBB","slug":"all-requests-returned-empty-with-no-error-messages","errorCode":null,"errorMessage":"All requests returned empty with no error messages.","messagePattern":"All requests returned empty with no error messages\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py","lineNumber":241,"sourceCode":"\n                    if len(received_symbols) == len(symbols):\n                        await websocket.close()\n                        break\n\n        tasks = [\n            asyncio.create_task(call_api(expiration)) for expiration in symbols_dict\n        ]\n        await asyncio.gather(*tasks, return_exceptions=True)\n\n        if messages and not results:\n            raise OpenBBError(\", \".join(messages))\n\n        if results and messages:\n            for message in messages:\n                warn(message)\n\n        if not results and not messages:\n            raise EmptyDataError(\"All requests returned empty with no error messages.\")\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: DeribitOptionsChainsQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> DeribitOptionsChainsData:\n        \"\"\"Transform the data.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        from numpy import nan\n        from pandas import DataFrame\n\n        df = DataFrame(data)\n\n        # For BTC and ETH options, we need to convert price units to USD.\n        for col in df.columns:","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py#L223-L259","documentation":"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.","triggerScenarios":"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.","commonSituations":"Querying an underlying whose option listing is momentarily empty, or websocket library version incompatibilities (websockets package API changes) that make every connect fail silently.","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."],"exampleFix":"# before\n# silently swallowed task exceptions make this fire with no clue\nres = obb.derivatives.options.chains(symbol=\"XRP\", provider=\"deribit\")\n\n# after\n# diagnose the expiry map first\nfrom openbb_deribit.utils.helpers import get_options_symbols\nexpiries = await get_options_symbols(\"XRP\")  # empty dict -> no options listed","handlingStrategy":"try-catch","validationCode":"from openbb_deribit.utils.helpers import get_options_symbols\nexpiries = asyncio.run(get_options_symbols(sym.upper()))\nif not expiries:\n    raise SystemExit(f\"no options currently listed for {sym}; nothing to fetch\")","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\ntry:\n    chains = obb.derivatives.options.chains(symbol=sym, provider=\"deribit\")\nexcept EmptyDataError:\n    chains = None  # all tasks silently empty; verify websockets version + listing","preventionTips":["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."],"tags":["deribit","options","no-data","websocket","silent-failure"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}