Player-props fetch ignores --gw and mixes two gameweeks' prices #9
Labels
No labels
architecture
cleanup
dependencies
performance
priority: high
priority: medium
reliability
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
solvreven/FPL#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found 2026-08-27 while restoring the Matches tab market column.
scripts/fetch_props.py --gw 2labels its banked rungw2_...but fetches thewhole upcoming slate, not the named gameweek. The 2026-08-27 run returned
20 fixtures — GW2's ten plus GW3's ten reverse fixtures (Ipswich v Liverpool,
Brighton v Leeds, Newcastle v Bournemouth, ...).
Two consequences:
Wrong prices can reach the screen.
props_load.load_goalscorer(gw, ...)reads every fixture in the run, so a player appearing in both gameweeks is
priced twice and which one wins is arbitrary. On the live tab this put
single-book GW3 outliers above Haaland:
It costs double. The run billed 20 credits against an estimate of 10,
because
event_oddsis per event. Balance 453 -> 433.This is the same class as the
/api/matchesgameweek defect fixed the same day:an artefact labelled with a gameweek that does not actually constrain its
contents.
Suggested fix. Filter the event list to the requested gameweek before
spending — the FPL fixture list gives the kickoff window, which is how
scripts/fetch_market.pyslices the bulk slate. Cost halves and the run's labelbecomes true.
load_goalscorershould additionally refuse a run whose fixturesfall outside the gameweek it was asked for, rather than trusting the directory
name.
Related: props coverage is poor regardless — US books only, half the
fixtures at 1-2 books and LOW confidence. Worth re-probing The Odds API
ukregion (a 2026-08-20 run showed Betfair, an exchange, covering 5/10) before
building anything on top of the current numbers.
Half of this is fixed. The half that costs credits is not. Recording which,
so the issue is not closed on the strength of the other one.
FIXED — the loader (
726c73b).props_load.this_round()filters a bankedrun to the requested gameweek on the FPL fixture pair, not on the run's
name:
An empty result refuses rather than serving nothing, since a board that
silently empties is indistinguishable from a book that quoted nobody. So the
wrong-prices-on-screen consequence is closed — the live case that prompted this
(a GW3 Haaland price wearing a GW2 fixture's label) cannot recur.
NOT FIXED — the fetch (
scripts/fetch_props.py).--gw Nstill names theoutput directory and nothing else:
There is no filter to the named gameweek before spending, so a
--gw 2runstill bills one credit per event across the whole slate. The double cost this
issue measured (20 credits against an estimate of 10) stands.
The fix suggested here still applies: slice
eventsagainst the FPL fixturelist for the requested gameweek before the spend loop, the way
scripts/fetch_market.pyslices the bulk slate. Halves the cost and makes therun's label true at the point it is created rather than only at the point it is
read.
Leaving open for that.
(Related, from the same week: Norsk Tipping now supplies goalscorer AND assist
prices free and unmetered —
scripts/fetch_norsk_tipping.py— which reduceshow often the metered fetch is needed but does not fix its scoping.)