OpenBB-finance/OpenBB · error · OpenBBError
"\n".join(messages) # messages contain e.g. 'No data was re
Error message
"\n".join(messages) # messages contain e.g. 'No data was returned for, {country}' or 'The response for, {country}, was returned empty.' What it means
EconDbYieldCurveFetcher.aextract_data raises OpenBBError with all accumulated per-country messages joined by newlines when every requested country failed (no results at all). The messages are of the form 'No data was returned for, {country}' (falsy response) or 'The response for, {country}, was returned empty.' (no 'results' key) — so the real cause is in the message body, not the exception type.
Source
Thrown at openbb_platform/providers/econdb/openbb_econdb/models/yield_curve.py:147
if not response:
messages.append(f"No data was returned for, {country}")
return
data = response.get("results") # type: ignore
if not data:
messages.append(f"The response for, {country}, was returned empty.")
return
results[country] = data
return
_countries = query.country.split(",")
tasks = [asyncio.create_task(get_one_country(c)) for c in _countries]
await asyncio.gather(*tasks)
if not results and messages:
msg_str = "\n".join(messages)
raise OpenBBError(msg_str)
if not results and not messages:
raise OpenBBError("Unexpected outcome -> All requests were returned empty.")
if results and messages:
for message in messages:
warn(message)
return results
@staticmethod
def transform_data(
query: EconDbYieldCurveQueryParams,
data: dict,
**kwargs: Any,
) -> AnnotatedResult[list[EconDbYieldCurveData]]:
"""Transform the data."""
# pylint: disable=import-outside-toplevelView on GitHub (pinned to 3e071fcc2c)
Solutions
- Set date to the most recent business day (or omit it — transform_query defaults to today, so pass an explicit recent weekday if today fails).
- Read each line of the message to identify whether all countries failed the same way.
- Retry once in case the temp token was bad; or supply your own econdb_api_key credential.
- Reduce to a single known-good country (e.g. 'united_states') to isolate the issue.
Example fix
# before obb.economy.yield_curve(provider='econdb', date='2026-08-15') # Saturday - no curve published # after - most recent business day obb.economy.yield_curve(provider='econdb', date='2026-08-13')
Defensive patterns
Strategy: try-catch
Validate before calling
from datetime import date, timedelta
d = query_date or date.today()
while d.weekday() >= 5: # back up to last weekday
d -= timedelta(days=1) Try / catch
from openbb_core.app.model.obbject import OpenBBError
try:
res = obb.economy.yield_curve(provider='econdb', country=','.join(cs), date=d)
except OpenBBError as e:
for line in str(e).splitlines(): # per-country diagnostics
logger.warning(line)
raise Prevention
- Always request recent business-day dates for yield curves.
- Split multi-country requests so one bad country does not sink all.
- Check each newline in the message - it names the failing countries.
When it happens
Trigger: economy.yield_curve(provider='econdb', country='...', date=D) where D falls on a weekend/holiday/unnegotiated day so every country's series response comes back empty; or a bad/expired token making all per-country API calls return nothing.
Common situations: Querying today's date when no curve was published (weekend/holiday); invalid temp token from create_token; date far in the past or future for all requested countries.
Related errors
- No data was found for the country, {query.country}, and date
- Error: The no data was found for the supplied symbols and co
- No data found for the provided dates. Data has a range from
- Error: No data to plot.
- The request was returned empty.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/44f117fb1558be56.
Report an issue: GitHub.