OpenBB-finance/OpenBB · error · OpenBBError
Error in Intrinio request -> {e} -> {symbols}
Error message
Error in Intrinio request -> {e} -> {symbols} What it means
Catch-all OpenBBError around the per-symbol forward P/E branch. After gather with return_exceptions=True, any non-Unauthorized/non-OpenBB exception re-raised during result inspection, or the EmptyDataError itself, gets re-wrapped with the failing symbol list. Note the except Exception clause also swallows the clearer EmptyDataError from the same try block, double-wrapping it as 'Error in Intrinio request -> ... empty ... -> symbols'.
Source
Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/forward_pe_estimates.py:117
if symbols:
try:
gather_results = await asyncio.gather(
*[get_one(symbol) for symbol in symbols], return_exceptions=True
)
for result in gather_results:
if isinstance(result, UnauthorizedError):
raise result
if isinstance(result, OpenBBError):
raise result
if not results:
raise EmptyDataError(
f"There were no results found for any of the given symbols. -> {symbols}"
)
return results
except Exception as e:
raise OpenBBError(
f"Error in Intrinio request -> {e} -> {symbols}"
) from e
async def fetch_callback(response, session):
"""Use callback for pagination."""
data = await response.json()
error = data.get("error", None)
if error:
message = data.get("message", "")
if "api key" in message.lower() or "view this data" in error.lower():
raise UnauthorizedError(
f"Unauthorized Intrinio request -> {message} -> {error}"
)
raise OpenBBError(f"Error: {error} -> {message}")
forward_pe = data.get("forward_pe")
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Parse the innermost exception text after the first '->' to find the true cause.
- If the inner message is about empty results, treat it as a coverage problem (see error 685), not a request error.
- For timeouts, reduce the symbol batch size or increase timeout kwargs.
- Report the over-broad except as a library issue - EmptyDataError should propagate unwrapped.
Defensive patterns
Strategy: try-catch
Try / catch
from openbb_core.provider.exceptions import OpenBBError
try:
res = obb.equity.estimates.forward_pe(symbol=syms, provider='intrinio')
except OpenBBError as e:
inner = str(e).split('->')[-2] if '->' in str(e) else str(e)
if 'empty' in inner.lower() or 'no results' in inner.lower():
handle_no_coverage(syms)
else:
raise Prevention
- Unwrap the chained '->' segments to find the root cause
- Remember EmptyDataError gets double-wrapped here - innermost text wins
- Reduce batch size on timeouts
- Report over-wrapping as a library issue
When it happens
Trigger: Any exception escaping the per-symbol gather loop of equity/estimates/forward_pe with provider=intrinio: an unexpected exception type in gather_results (e.g. TimeoutError, JSONDecodeError), or the EmptyDataError raised when no symbol yielded data being caught here and re-wrapped.
Common situations: Timeouts on multi-symbol batches; the misleading double-wrapped message making an empty-result case look like a request failure; code updates to exception types not covered by the isinstance checks.
Related errors
- Error: {error} -> {message}
- {e}
- Error: {error} -> {message}
- Error: {error} -> {message}
- No results were found. -> {query.symbol}
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/73dc14360d1cef64.
Report an issue: GitHub.