{"record":{"id":"f4a08b1a68f8e530","repo":"OpenBB-finance/OpenBB","slug":"no-data-was-found-for-the-country-query-country","errorCode":null,"errorMessage":"No data was found for the country, {query.country}, and dates, {query.date}","messagePattern":"No data was found for the country, (.+?), and dates, (.+?)","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/econdb/openbb_econdb/models/yield_curve.py","lineNumber":262,"sourceCode":"                    return int(unit)\n                return int(unit) / 12\n\n            new_df[\"maturity_years\"] = new_df.maturity.apply(convert_duration)\n\n            new_df = new_df.replace({nan: None})\n            records = [\n                EconDbYieldCurveData.model_validate(r)\n                for r in new_df.to_dict(\"records\")\n                if r.get(\"rate\")\n            ]\n            results_data.extend(records)\n            results_metadata[country] = metadata\n\n        for country, country_data in data.items():\n            process_country_data(country, country_data)\n\n        if not results_data:\n            raise EmptyDataError(\n                f\"No data was found for the country, {query.country}, and dates, {query.date}\"\n            )\n        return AnnotatedResult(result=results_data, metadata=results_metadata)\n","sourceCodeStart":244,"sourceCodeEnd":266,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/econdb/openbb_econdb/models/yield_curve.py#L244-L266","documentation":"EmptyDataError from EconDbYieldCurveFetcher.transform_data: raw series data was fetched for the requested countries, but after reshaping and dropping rows without a 'rate' value, results_data is empty for query.date. The curve for that date simply does not exist in the fetched series (weekend, holiday, or pre-publication date).","triggerScenarios":"economy.yield_curve(provider='econdb', date=D) where D is a non-trading day or a day with no rate observations for all requested countries — extraction succeeds (series exist) but the date slice is empty.","commonSituations":"Weekend/holiday dates; asking for today's curve before publication; dates earlier than a country's series start.","solutions":["Use the most recent weekday for the requested markets.","Omit date and check what the latest available curve date is in the returned metadata.","For a specific past date, confirm it was a trading day in that country's bond market."],"exampleFix":"# before\nobb.economy.yield_curve(provider='econdb', date='2026-08-15')  # Saturday\n\n# after\nfrom datetime import date, timedelta\nlast_bday = date(2026, 8, 14)\nwhile last_bday.weekday() >= 5:\n    last_bday -= timedelta(days=1)\nobb.economy.yield_curve(provider='econdb', date=last_bday)","handlingStrategy":"validation","validationCode":"from datetime import date, timedelta\nd = query_date or date.today()\nwhile d.weekday() >= 5:\n    d -= timedelta(days=1)\n# further guard: country-specific holidays may still yield no curve - retry d-1 on empty","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\nfrom datetime import timedelta\nfor _ in range(5):\n    try:\n        res = obb.economy.yield_curve(provider='econdb', country=c, date=d)\n        break\n    except EmptyDataError:\n        d -= timedelta(days=1)  # walk back over holidays\nelse:\n    raise","preventionTips":["Walk back from weekends/holidays one day at a time on empty results.","Omit date and read the latest available date from result metadata.","Remember different countries have different holiday calendars."],"tags":["yield-curve","empty-data","date-range","econdb"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}