soccerdata
soccerdata copied to clipboard
[Common] Incorrect default seasons
Describe the bug Despite the latest update, you can't get the data for the 2024/25 season, the loaded seasons in fact always stop at 2023/24
Affected scrapers This affects the following scrapers:
- [X] ClubElo
- [X] ESPN
- [X] FBref
- [X] FiveThirtyEight
- [X] FotMob
- [X] Match History
- [X] SoFIFA
- [X] Understat
- [X] WhoScored
Test Code
import soccerdata as sd
import pandas as pd
understat = sd.Understat(leagues="ITA-Serie A")
seasons = understat.read_seasons()
seasons
Thanks. This is a bug in the code that sets the default seasons.
https://github.com/probberechts/soccerdata/blob/4cf2debc2d4946be86ea6decdbe9d87380119cb8/soccerdata/_common.py#L474-L477
If you explicitly provide the seasons for which you want to retrieve data, it works.
understat = sd.Understat(leagues="ITA-Serie A", seasons="24/25", no_cache=True)
Thanks! It works good