[GH-ISSUE #657] [FBRef] read_team_match_stats does not work #128

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

Originally created by @ArsendiMattia on GitHub (Aug 2, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/657

If you do

fbref = sd.FBref(leagues='ENG-Premier League', seasons="23-24")
matches = fbref.read_team_match_stats(stat_type="shooting", opponent_stats=False)

it fails with the following error:
ValueError: not enough values to unpack (expected 1, got 0)

My understanding is that it cannot retrieve any data for the Premier League. Conversely, the function works for Serie A or Ligue 1.

Originally created by @ArsendiMattia on GitHub (Aug 2, 2024). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/657 If you do ``` fbref = sd.FBref(leagues='ENG-Premier League', seasons="23-24") matches = fbref.read_team_match_stats(stat_type="shooting", opponent_stats=False) ``` it fails with the following error: `ValueError: not enough values to unpack (expected 1, got 0)` My understanding is that it cannot retrieve any data for the Premier League. Conversely, the function works for Serie A or Ligue 1.
kerem closed this issue 2026-03-02 15:56:01 +03:00
Author
Owner

@ArsendiMattia commented on GitHub (Aug 2, 2024):

For the season 2022-23 works. It is probably a problem with FBref itself.

<!-- gh-comment-id:2265979743 --> @ArsendiMattia commented on GitHub (Aug 2, 2024): For the season 2022-23 works. It is probably a problem with FBref itself.
Author
Owner

@ArsendiMattia commented on GitHub (Aug 3, 2024):

It turns out that if I add the following flag to the function, everything works fine! It still needs to be clarified to me, though.

fbref = sd.FBref(leagues='ENG-Premier League', seasons="2023-24", no_cache=True)

<!-- gh-comment-id:2266655145 --> @ArsendiMattia commented on GitHub (Aug 3, 2024): It turns out that if I add the following flag to the function, everything works fine! It still needs to be clarified to me, though. `fbref = sd.FBref(leagues='ENG-Premier League', seasons="2023-24", no_cache=True)`
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#128
No description provided.