[GH-ISSUE #740] [Common] Incorrect default seasons #161

Open
opened 2026-03-02 15:56:17 +03:00 by kerem · 2 comments
Owner

Originally created by @MimmoScogna on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/740

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:

  • ClubElo
  • ESPN
  • FBref
  • FiveThirtyEight
  • FotMob
  • Match History
  • SoFIFA
  • Understat
  • WhoScored

Test Code

import soccerdata as sd
import pandas as pd
understat = sd.Understat(leagues="ITA-Serie A")
seasons = understat.read_seasons()
seasons
image
Originally created by @MimmoScogna on GitHub (Oct 30, 2024). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/740 **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 ``` <img width="569" alt="image" src="https://github.com/user-attachments/assets/2b1d5b8d-cfdc-4e8e-a792-afab1324805f">
Author
Owner

@probberechts commented on GitHub (Oct 30, 2024):

Thanks. This is a bug in the code that sets the default seasons.

github.com/probberechts/soccerdata@4cf2debc2d/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)
<!-- gh-comment-id:2448231727 --> @probberechts commented on GitHub (Oct 30, 2024): 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. ```py understat = sd.Understat(leagues="ITA-Serie A", seasons="24/25", no_cache=True) ```
Author
Owner

@MimmoScogna commented on GitHub (Oct 30, 2024):

Thanks! It works good

<!-- gh-comment-id:2448628078 --> @MimmoScogna commented on GitHub (Oct 30, 2024): Thanks! It works good
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#161
No description provided.