OpenBB-finance/OpenBB · error · OpenBBError
No data was returned.
Error message
No data was returned.
What it means
Raised inside the ECB yield-curve fetcher's per-maturity task when the response from data.ecb.europa.eu/data-detail-api/{series_id} is falsy (None, empty list, or empty dict). Each of the ~30+ maturity series is fetched independently, so one dead/empty series fails the whole asyncio.gather call.
Source
Thrown at openbb_platform/providers/ecb/openbb_ecb/models/yield_curve.py:106
if use_cache is True:
cache_dir = f"{get_user_cache_directory()}/http/ecb_yield_curve"
async with CachedSession(
cache=SQLiteBackend(cache_dir, expire_after=3600 * 4)
) as session:
await session.delete_expired_responses()
try:
response = await amake_request(
url,
session=session, # type: ignore
)
finally:
await session.close()
else:
response = await amake_request(url=url)
if not response:
raise OpenBBError("No data was returned.")
if isinstance(response, list):
for item in response:
d = {
"date": item.get("PERIOD"),
"maturity": maturity,
"rate": item.get("OBS_VALUE_AS_IS"),
}
results.append(d)
tasks = [get_one(maturity, query.use_cache) for maturity in MATURITIES]
await asyncio.gather(*tasks)
return results
@staticmethod
def transform_data(View on GitHub (pinned to 3e071fcc2c)
Solutions
- Retry with use_cache=False to rule out a cached empty response: obb.fixedincome.government_yield_curve(provider='ecb', use_cache=False).
- Update the openbb-ecb provider (pip install -U openbb-ecb) so yield_curve_series ids match the current ECB series.
- Clear the cache directory (<user_cache>/http/ecb_yield_curve) if old empty responses persist.
- Fall back to another provider for yield curves if ECB is mid-incident.
Example fix
# before data = obb.fixedincome.government_yield_curve(provider="ecb") # one empty series kills all # after data = obb.fixedincome.government_yield_curve(provider="ecb", use_cache=False)
Defensive patterns
Strategy: retry
Validate before calling
import requests
def maturity_series_ok(series_id: str) -> bool:
r = requests.get(f"https://data.ecb.europa.eu/data-detail-api/{series_id}", timeout=10)
return r.status_code == 200 and bool(r.json()) Try / catch
from openbb_core.provider.utils.errors import OpenBBError
try:
curve = obb.fixedincome.government_yield_curve(provider="ecb")
except OpenBBError as e:
if "No data was returned" in str(e):
curve = obb.fixedincome.government_yield_curve(provider="ecb", use_cache=False) # retry fresh
else:
raise Prevention
- Pass use_cache=False when diagnosing; a cached empty response reproduces this error forever.
- Keep openbb-ecb updated so ECB series-id re-baskets are picked up.
- Clear <user_cache>/http/ecb_yield_curve after ECB incidents.
When it happens
Trigger: Calling obb.fixedincome.government_yield_curve(provider="ecb", ...).get() when any single maturity series id returns an empty body — commonly a discontinued series (ECB occasionally re-baskets series), or a cached empty response replayed by aiohttp_client_cache when use_cache=True.
Common situations: ECB retires/renames a series id in yield_curve_series.py after the provider release; stale SQLite HTTP cache containing an empty 200 response; transient empty responses during ECB maintenance windows.
Related errors
- The request was returned empty.
- Error: No data to plot.
- Error: Maturity column not found in the data.
- No data found.
- There was an error with the request and it was returned empt
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/d4947ddb4efd4cf5.
Report an issue: GitHub.