tursodatabase/turso · error · ValueError
no sweep results found
Error message
no sweep results found
What it means
read_sweep raises this ValueError when the provided path list is empty or yielded no parseable sweep points, meaning there is nothing to plot. It is the guard against silently producing an empty connection-sweep chart.
Solutions
- Pass at least one valid sweep result CSV to plot-fts.py.
- Check the results directory/glob actually contains sweep files.
- Generate sweep results by running the FTS benchmark before plotting.
Example fix
# before python plot-fts.py results/empty-dir/*.csv # after python plot-fts.py results/c1.csv results/c8.csv
Defensive patterns
Strategy: validation
Validate before calling
import glob
paths = sorted(glob.glob('results/sweep-*.csv'))
assert paths, 'no sweep result files found; run the benchmark first' Try / catch
try:
config, points = read_sweep(paths)
except ValueError as e:
if 'no sweep results found' in str(e):
print('Fix: point plot-fts.py at existing sweep CSV files')
else:
raise Prevention
- Check the results directory is non-empty before invoking plot-fts.py.
- Avoid globs that can silently match nothing; list files explicitly in scripts.
- Run the sweep benchmark before attempting to plot.
When it happens
Trigger: Calling read_sweep (via main) with an empty list of sweep CSV paths, or paths whose read_runs calls raised/excluded all points such that `points` stays empty.
Common situations: Running plot-fts.py against an empty results directory or a glob that matched nothing; all candidate files were rejected earlier in the pipeline.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- no results found
- each sweep file must have a distinct positive connection…
- no results found
- : each run must contain the same series and all six query…
- : no results found
AI-assisted analysis of tursodatabase/turso@8d4a589f8d (2026-09-20).
Data as JSON: /api/errors/a421018f6d09619b.
Report an issue: GitHub.
Appendix: source
Thrown at perf/fts/plot/plot-fts.py:64
plot(configuration, samples, output)
print(f"wrote {output}")
def read_sweep(paths, percentile="p50"):
configuration = None
points = {}
for path in paths:
current, samples = read_runs([path], percentile)
connections = int(current.pop("connections"))
if connections <= 0 or connections in points:
raise ValueError("each sweep file must have a distinct positive connection count")
if configuration is None:
configuration = current
if current != configuration or (points and set(samples) != set(next(iter(points.values())))):
raise ValueError("sweep files must match benchmark, sample budget, fixture and engine/mode series")
points[connections] = samples
if not points:
raise ValueError("no sweep results found")
return configuration, dict(sorted(points.items()))
def read_runs(paths, percentile="p50"):
configuration = None
samples = {}
expected_series = None
for path in paths:
current, runs = read_file(path, percentile, samples)
if configuration is None:
configuration = current
if configuration != current:
raise ValueError("plot only one configuration at a time")
for run in runs.values():
if expected_series is None:
expected_series = set(run)
if set(run) != expected_series or any(seen != set(QUERIES) for seen in run.values()):
raise ValueError(f"{path}: each run must contain the same series and all six query cases")View on GitHub (pinned to 8d4a589f8d)