OpenBB-finance/OpenBB · error · OpenBBError
{e}
Error message
{e} What it means
OpenBBError wrapping any exception raised while fetching forward P/E data for a single symbol inside get_one(). The amake_request call (or its response_callback) threw something other than a pass-through OpenBBError, and this handler re-raises it as OpenBBError with the original as cause, so per-symbol network/parse failures are not silently dropped when symbols are requested individually.
Source
Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/forward_pe_estimates.py:94
import asyncio # noqa
from openbb_core.provider.utils.errors import EmptyDataError, UnauthorizedError
from openbb_core.provider.utils.helpers import amake_request
from openbb_intrinio.utils.helpers import response_callback
api_key = credentials.get("intrinio_api_key") if credentials else ""
BASE_URL = "https://api-v2.intrinio.com/zacks/forward_pe"
symbols = query.symbol.split(",") if query.symbol else None
results: list[dict] = []
async def get_one(symbol):
"""Get the data for one symbol."""
url = f"{BASE_URL}/{symbol}?api_key={api_key}"
try:
data = await amake_request(
url, response_callback=response_callback, **kwargs
)
except Exception as e:
raise OpenBBError(e) from e
if data:
results.append(data) # type: ignore
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(View on GitHub (pinned to 3e071fcc2c)
Solutions
- Inspect the wrapped exception text (it embeds the underlying error) to identify network vs parse failure.
- Retry the single failing symbol after a short delay for transient network errors.
- Verify the symbol with a direct curl to the same URL including your api_key.
- Split large symbol batches to isolate the failing ticker.
Defensive patterns
Strategy: retry
Validate before calling
import socket
socket.gethostbyname('api-v2.intrinio.com') # fail fast on DNS problems before the call Try / catch
from openbb_core.provider.exceptions import OpenBBError
import time
for attempt in range(3):
try:
res = obb.equity.estimates.forward_pe(symbol=sym, provider='intrinio')
break
except OpenBBError as e:
if attempt == 2 or 'empty' in str(e).lower():
raise
time.sleep(2 ** attempt) Prevention
- Use bounded retries with exponential backoff for transient network errors
- Check the __cause__ text to distinguish network vs API errors
- Split batches so one ticker's failure is isolated
When it happens
Trigger: equity/estimates/forward_pe with provider=intrinio where amake_request for 'https://api-v2.intrinio.com/zacks/forward_pe/{symbol}' raises a network timeout, connection reset, JSON decode error, or unexpected status; also raised from the per-symbol path when the callback itself throws.
Common situations: Transient network failures or DNS issues; Intrinio returning non-JSON (HTML error page) for a bad symbol; proxies/firewalls intercepting the request; one bad ticker in a comma-separated batch.
Related errors
- Error: {error} -> {message}
- Error in Intrinio request -> {e} -> {symbols}
- Error: {error} -> {message}
- Error: {error} -> {message}
- {str(e) or 'FRED request failed ({type(e).__name__}).'}
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/37715836735570cf.
Report an issue: GitHub.