[GH-ISSUE #615] [FBref] read_schedule with default params returns key error #117

Closed
opened 2026-03-02 15:55:55 +03:00 by kerem · 2 comments
Owner

Originally created by @Kalaweksh on GitHub (Jun 23, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/615

This block of code in FBref.read_leagues(split_up_big5 = True) tries to index "Big 5 European Leagues Combined" with the individual league names, producing a key error downstream.image

(By default the top array contains the leagues attempting to be indexed)
image

Originally created by @Kalaweksh on GitHub (Jun 23, 2024). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/615 This block of code in FBref.read_leagues(split_up_big5 = True) tries to index "Big 5 European Leagues Combined" with the individual league names, producing a key error downstream.![image](https://github.com/probberechts/soccerdata/assets/121249707/cd04317d-a35c-4777-a137-63192d626063) (By default the top array contains the leagues attempting to be indexed) ![image](https://github.com/probberechts/soccerdata/assets/121249707/9f74f661-47c5-404e-b84b-3904dcbf5825)
kerem 2026-03-02 15:55:55 +03:00
  • closed this issue
  • added the
    FBref
    label
Author
Owner

@probberechts commented on GitHub (Jul 5, 2024):

I am not sure whether I get this. Can you give a minimal code example that produces the error?

<!-- gh-comment-id:2211379212 --> @probberechts commented on GitHub (Jul 5, 2024): I am not sure whether I get this. Can you give a minimal code example that produces the error?
Author
Owner

@Kalaweksh commented on GitHub (Aug 10, 2024):

It occurs when calling FBref.read_schedule() with a cached FBref object. Seems to be avoided by using no cache and specifying leagues and seasons as you suggested in #658 :

import soccerdata as sd
fbref = sd.FBref("ENG-Premier League", 2425, no_cache=True)
fbref.read_seasons()
<!-- gh-comment-id:2282262868 --> @Kalaweksh commented on GitHub (Aug 10, 2024): It occurs when calling `FBref.read_schedule()` with a cached FBref object. Seems to be avoided by using no cache and specifying leagues and seasons as you suggested in #658 : ``` import soccerdata as sd fbref = sd.FBref("ENG-Premier League", 2425, no_cache=True) fbref.read_seasons() ```
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#117
No description provided.