OpenBB-finance/OpenBB · warning · EmptyDataError
No tickers found for the supplied parameters. Try relaxing t
Error message
No tickers found for the supplied parameters. Try relaxing the constraints.
What it means
After running the Finviz screener, the resulting DataFrame is None or empty, so the fetcher raises EmptyDataError advising relaxed constraints. The screen executed but matched zero tickers (or finvizfinance returned nothing), which is an expected empty-result condition rather than a bug.
Source
Thrown at openbb_platform/providers/finviz/openbb_finviz/models/equity_screener.py:719
if not filters_dict and query.signal is None:
screen.set_filter(signal=d_signals["top_gainers"])
warn(
"No filters or signal provided. Defaulting to 'top_gainers' signal."
+ " Use the preset, 'all_stocks', to explicitly return every stock on Finviz."
+ " Returning 10K symbols can take several minutes."
)
df_screen = screen.screener_view(
order=sort_by,
limit=limit if limit else 100000,
ascend=ascend,
sleep_sec=sleep,
verbose=0,
)
if df_screen is None or df_screen.empty:
raise EmptyDataError(
"No tickers found for the supplied parameters. Try relaxing the constraints."
)
df_screen.columns = [val.strip("\n") for val in df_screen.columns]
# Commas in the company name can cause issues with delimiters.
if "Company" in df_screen.columns:
df_screen["Company"] = df_screen["Company"].str.replace(",", "")
return df_screen.convert_dtypes().replace({nan: None}).to_dict(orient="records")
@staticmethod
def transform_data(
query: FinvizEquityScreenerQueryParams,
data: list[dict],
**kwargs: Any,
) -> list[FinvizEquityScreenerData]:
"""Transform data."""
return [FinvizEquityScreenerData.model_validate(d) for d in data]View on GitHub (pinned to 3e071fcc2c)
Solutions
- Remove or loosen filters one at a time until results appear
- Prefer range buckets over tight thresholds where Finviz only offers buckets
- Catch EmptyDataError and treat the screen as 'no matches' in automated pipelines
Example fix
# before
q = FinvizEquityScreenerQueryParams(preset="ultra_narrow") # 0 matches -> EmptyDataError
# after
from openbb_core.provider.abstract.fetcher import EmptyDataError
try:
res = await obb.equity.screener(provider="finviz", preset="ultra_narrow")
except EmptyDataError:
res = await obb.equity.screener(provider="finviz", preset="broader_preset") Defensive patterns
Strategy: try-catch
Try / catch
from openbb_core.provider.abstract.errors import EmptyDataError
try:
rows = await FinvizEquityScreenerFetcher.transform_query(...) # fetch stage
except EmptyDataError:
rows = [] # screen matched nothing; relax constraints or move on Prevention
- Prefer one or two broad filters over stacking many narrow ones
- In automated screen generation, treat EmptyDataError as a skip, not a crash
- Test preset viability with a small limit before full runs
When it happens
Trigger: Stacking multiple restrictive filters (e.g. tiny market cap + high dividend + strong signal); a preset whose combined filters are unsatisfiable; pagination/limit interactions returning an empty frame; signal-based screens whose window has no matches.
Common situations: Optimization loops that auto-generate filter combinations, many of which are unsatisfiable; presets tuned in a different market regime.
Related errors
- No data was returned for any symbol
- Invalid signal '{v}'. Available signals are: {SIGNALS_DESC_S
- Invalid industry '{v}'. Available industries are: {', '.join
- Invalid preset '{preset}'. Available presets are: {list(pres
- No data was returned for any symbol
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/7a1910b52c705233.
Report an issue: GitHub.