OpenBB-finance/OpenBB · warning · EmptyDataError

Error: The request was returned as empty. Try adjusting the

Error message

Error: The request was returned as empty. Try adjusting the requested date ranges, if applicable.

What it means

EmptyDataError raised at the end of IntrinioCompanyNewsFetcher.transform_query/aresults after all per-symbol tasks complete and the accumulated 'news' list is empty. It means every request succeeded (or warned) but zero articles survived the fetch and URL-dedup stage, so there is nothing to transform into CompanyNewsData rows.

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py:272

            """Get the data for one symbol."""
            url = f"{base_url}/{symbol}/news?{query_str}&page_size={query.limit}&api_key={api_key}"
            data = await amake_request(url, response_callback=callback, **kwargs)
            if not data:
                warn(f"No data found for: {symbol}")
            if data:
                data = [x for x in data if not (x["url"] in seen or seen.add(x["url"]))]  # type: ignore
                news.extend(
                    sorted(data, key=lambda x: x["publication_date"], reverse=True)[
                        : query.limit
                    ]
                )

        tasks = [get_one(symbol) for symbol in symbols]

        await asyncio.gather(*tasks)

        if not news:
            raise EmptyDataError(
                "Error: The request was returned as empty."
                + " Try adjusting the requested date ranges, if applicable."
            )

        return news

    # pylint: disable=unused-argument
    @staticmethod
    def transform_data(
        query: IntrinioCompanyNewsQueryParams, data: list[dict], **kwargs: Any
    ) -> list[IntrinioCompanyNewsData]:
        """Return the transformed data."""
        results: list[IntrinioCompanyNewsData] = []
        for item in data:
            body = item.get("body", {})
            if not body:
                item["text"] = item.pop("summary")
            if body:

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Widen or clear start_date/end_date and retry
  2. Confirm the symbol trades and has news coverage (check another provider, e.g. provider='benzinga' or 'fmp')
  3. Relax the relevance-score filter parameters if set
  4. Handle EmptyDataError as an expected empty result in batch jobs rather than a failure

Example fix

# before
res = obb.news.company_news(provider="intrinio", symbol="XYZ", start_date="2020-01-01", end_date="2020-01-02")

# after
from openbb_core.provider.utils.errors import EmptyDataError
try:
    res = obb.news.company_news(provider="intrinio", symbol="AAPL")
except EmptyDataError:
    res = None  # no articles in window — expected for some tickers
Defensive patterns

Strategy: try-catch

Validate before calling

def news_window_plausible(start_date: str, end_date: str) -> bool:
    from datetime import datetime
    s, e = datetime.fromisoformat(start_date), datetime.fromisoformat(end_date)
    return s < e and e.year >= 2000  # intrinio news coverage era

Type guard

from openbb_core.provider.utils.errors import EmptyDataError

Try / catch

from openbb_core.provider.utils.errors import EmptyDataError

try:
    news = await obb.news.company_news(provider="intrinio", symbol=sym)
except EmptyDataError:
    news = []  # no articles — normal outcome, continue pipeline

Prevention

When it happens

Trigger: Requesting a valid but news-less symbol (small caps, new listings), a date window outside available coverage, a relevance score filter (business_relevance_of_news_x) that excludes everything, or a combination of symbols where each returns an empty 'news' array.

Common situations: Backfill pipelines scanning thousands of tickers where many legitimately have no articles; narrow start/end date windows; users assuming the API errors on no-data — instead OpenBB raises EmptyDataError so callers must treat empty as a normal outcome.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/c12b29b33b5e7c91. Report an issue: GitHub.