OpenBB-finance/OpenBB · warning · EmptyDataError
No data was returned for any symbol
Error message
No data was returned for any symbol
What it means
Finviz equity profile fetcher raises EmptyDataError('No data was returned for any symbol') after iterating every symbol in the comma-separated query. Each per-symbol attempt returned neither a result nor an error message collected in `messages`, so the provider cannot distinguish 'bad symbol' from 'no data' and reports an empty dataset.
Source
Thrown at openbb_platform/providers/finviz/openbb_finviz/models/equity_profile.py:226
else None
),
"long_description": description if description else None,
}
)
return result
symbols = query.symbol.split(",")
for symbol in symbols:
result = get_one(symbol)
if result is not None and result:
results.append(result)
if not results and messages:
raise OpenBBError("\n".join(messages))
if not results and not messages:
raise EmptyDataError("No data was returned for any symbol")
if results and messages:
for message in messages:
warn(message)
return results
@staticmethod
def transform_data(
query: FinvizEquityProfileQueryParams,
data: list[dict],
**kwargs: Any,
) -> list[FinvizEquityProfileData]:
"""Transform and validate the raw data."""
return [FinvizEquityProfileData.model_validate(d) for d in data]
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Test each symbol individually to identify which ones return nothing
- Strip whitespace and drop empty entries from the comma-separated symbol string before querying
- Use Finviz-recognized tickers (no exchange suffixes, no dots where Finviz expects dashes)
- If partial results are acceptable, split the request per symbol and skip the empties
Example fix
# before
result = await obb.equity.profile(symbol="FOO,BAR,ZZZZZZ") # all invalid -> EmptyDataError
# after
raw = "FOO,BAR,ZZZZZZ"
symbols = ",".join(s.strip() for s in raw.split(",") if s.strip())
result = await obb.equity.profile(symbol=symbols) Defensive patterns
Strategy: validation
Validate before calling
def clean_symbols(raw: str) -> str:
return ",".join(s.strip() for s in raw.split(",") if s.strip())
symbols = clean_symbols(query_symbol)
assert symbols, "symbol string is empty after cleaning" Type guard
def is_finviz_symbol_list(s: str) -> bool:
parts = [p for p in s.split(",") if p.strip()]
return len(parts) > 0 and all(p.strip().isascii() and 1 <= len(p.strip()) <= 6 for p in parts) Try / catch
from openbb_core.provider.abstract.errors import EmptyDataError
try:
profiles = await FinvizEquityProfileFetcher.transform_query(...)
except EmptyDataError:
profiles = [] # none of the tickers resolved on Finviz Prevention
- Validate tickers exist on Finviz before batch profile pulls
- Strip whitespace and drop empty entries from comma-separated symbol strings
- Query one symbol first to confirm coverage before batching
When it happens
Trigger: Passing a symbols string where none of the tickers resolve on Finviz (e.g. 'FOOBAR,INVALID'); all symbols returning empty profile rows; symbols with whitespace or exchange suffixes (e.g. 'BRK.B') that Finviz rejects silently.
Common situations: Batch jobs feeding unvalidated ticker lists from a database; using non-US or delisted tickers against a US-screener-only data source; trailing commas producing empty symbol strings.
Related errors
- No tickers found for the supplied parameters. Try relaxing t
- \n".join(messages)
- No data was returned for any symbol
- \n".join(messages)
- No data was returned for any symbol
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/4c8840a02087ec6c.
Report an issue: GitHub.