OpenBB-finance/OpenBB · warning · EmptyDataError
No data was returned.
Error message
No data was returned.
What it means
EmptyDataError raised in IntrinioEtfInfoFetcher after all per-symbol requests complete: each callback only warns ('Symbol Error: ... for <symbol>') on error responses and appends nothing, so if every symbol errored, 'results' stays empty and this error is raised.
Source
Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/etf_info.py:641
symbol + ":US" if ":" not in symbol else symbol for symbol in symbols
]
urls = [f"{base_url}{symbol}?api_key={api_key}" for symbol in symbols]
results = []
async def response_callback(response, _):
"""Response callback."""
result = await response.json()
if "error" in result:
warn(f"Symbol Error: {result['error']} for {response.url.parts[-1]}")
return
_ = result.pop("messages", None)
results.append(result)
await amake_requests(urls, response_callback, **kwargs) # type: ignore
if not results:
raise EmptyDataError("No data was returned.")
return sorted(
results,
key=(lambda item: (symbols.index(item.get("figi_ticker", len(symbols))))),
)
@staticmethod
def transform_data(
query: IntrinioEtfInfoQueryParams,
data: list[dict],
**kwargs: Any,
) -> list[IntrinioEtfInfoData]:
"""Transform data."""
return [IntrinioEtfInfoData.model_validate(d) for d in data]
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Check captured warnings — they contain the per-symbol Intrinio error that explains the empty result
- Validate/refresh the ticker list against obb.etf.search(provider='intrinio') before calling
- Enable warnings display in production jobs (don't run with -W ignore) so the per-symbol cause is visible
Example fix
import warnings
from openbb_core.provider.utils.errors import EmptyDataError
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
try:
res = obb.etf.info(provider="intrinio", symbol="BAD1,BAD2")
except EmptyDataError:
for warning in w:
print(warning.message) # per-symbol Intrinio error text Defensive patterns
Strategy: try-catch
Validate before calling
def valid_etf_symbols(symbols: list[str], known: set[str]) -> list[str]:
"""Filter to symbols confirmed via etf.search to avoid all-error batches."""
return [s for s in symbols if s.upper() in known] Type guard
from openbb_core.provider.utils.errors import EmptyDataError
Try / catch
import warnings
from openbb_core.provider.utils.errors import EmptyDataError
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always")
try:
res = await obb.etf.info(provider="intrinio", symbol=",".join(syms))
except EmptyDataError:
reasons = [str(w.message) for w in caught] # per-symbol Intrinio errors
raise RuntimeError(f"all symbols failed: {reasons}") from None Prevention
- Record warnings around multi-symbol calls — individual failures only warn
- Don't suppress warnings in jobs that rely on etf.info
- Prefilter symbol lists through etf.search
When it happens
Trigger: Calling etf.info / etf.search metadata with only invalid symbols; the warnings module output shows each individual failure reason (e.g. 'Symbol Error: ... for XYZ') while the final exception says only 'No data was returned.'.
Common situations: Bulk jobs where a stale ticker list contains symbols Intrinio doesn't recognize; warnings suppressed (python -W ignore or logging config) so users see only the opaque final error; one bad symbol among many still succeeds — only all-bad raises.
Related errors
- No holdings were found for {query.symbol}, and the response
- No data was returned.
- No data found.
- No data found for the given symbols.
- No presentation hierarchies found for dataflow '{dataflow_id
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/7719fd6335a9f6ac.
Report an issue: GitHub.