OpenBB-finance/OpenBB · error · OpenBBError
No data found for {query.symbol} for year {query.year} and p
Error message
No data found for {query.symbol} for year {query.year} and period {query.quarter}. What it means
Raised as OpenBBError (wrapping ValueError) by FMPEarningsCallTranscript.transform_data when the dict passed from a_url is falsy. This is a defensive backstop: normally a_url already fails at error 407, so hitting 408 means the fetch returned something empty/None that slipped through.
Source
Thrown at openbb_platform/providers/fmp/openbb_fmp/models/earnings_call_transcript.py:150
"https://financialmodelingprep.com/stable/earning-call-transcript?symbol="
+ f"{query.symbol.upper()}&year={year}&quarter={quarter}&apikey={api_key}"
)
try:
return await get_data_one(url, **kwargs)
except ValueError as e:
raise OpenBBError(
f"No transcript found for {query.symbol} in {year} Q{quarter}"
f". \n Latest available transcript is {df_dates.iloc[0].fiscalYear} Q{df_dates.iloc[0].quarter}."
) from e
@staticmethod
def transform_data(
query: FMPEarningsCallTranscriptQueryParams, data: dict, **kwargs: Any
) -> FMPEarningsCallTranscriptData:
"""Return the transformed data."""
if not data:
raise OpenBBError(
ValueError(
f"No data found for {query.symbol} for year {query.year} and period {query.quarter}."
)
)
transcript = data.get("content", "")
output_lines: list = []
intro_lines = f"""
## {data.get("symbol")} - {data.get("year")} {data.get("period")} Earnings Call Transcript - {data.get("date")}
\n\n
"""
output_lines.append(intro_lines + "\n\n")
for line in transcript.splitlines():
section_title = line.split(":", 1)[0] if ":" in line else ""
section_line = line.split(":", 1)[1] if ":" in line else ""
if section_title and section_line:
output_lines.append(f"### **{section_title.strip()}**:" + "\n\n")
output_lines.append(section_line.strip() + "\n\n")View on GitHub (pinned to 3e071fcc2c)
Solutions
- Re-run the exact call - if reproducible, inspect the raw FMP URL for that symbol/year/quarter to see the payload shape
- Update the openbb_fmp package (pip install -U openbb-fmp) in case FMP changed its response contract and the provider was patched
- If writing tests/mocks, ensure the stubbed response includes a non-empty dict with 'content'
- Catch OpenBBError and surface the symbol/year/quarter context to the user
Example fix
# before (mock returns empty)
mock_fetch.return_value = {}
# after
mock_fetch.return_value = {"symbol": "AAPL", "year": 2025, "period": "Q2", "date": "2025-05-01", "content": "..."} Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
def is_transcript_payload(d: dict) -> bool:
return bool(d) and isinstance(d.get('content'), str) and len(d['content']) > 0 Try / catch
from openbb_core.provider.utils.errors import OpenBBError
try:
t = await obb.equity.earnings_transcript.async_(symbol=sym, provider='fmp')
except OpenBBError as e:
if 'No data found for' in str(e):
log.warning('Empty transcript payload for %s; upstream shape change?', sym)
raise Prevention
- Pin and update the openbb-fmp package when FMP revises response shapes
- In tests, stub transcript fetches with realistic non-empty dicts
- Retry once on empty-payload errors; usually transient
When it happens
Trigger: Calling earnings_transcript and receiving an empty dict from the fetch layer - e.g. FMP returned a 200 with an empty object, or a pipeline/mocking layer injected empty data between fetch and transform.
Common situations: Edge-case upstream payloads (200 with empty body), unit tests stubbing the fetch with {}, or changes in FMP response shape after an API revision.
Related errors
- No data returned for the given symbols.
- The request was returned empty.
- No data found for the given query -> {query.model_dump()}
- The request was returned empty.
- No results were found with the query supplied. -> {query.que
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/e2031603139b0140.
Report an issue: GitHub.