probberechts / soccerdata

⛏⚽ Scrape soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, FotMob, Sofascore, SoFIFA, Understat and WhoScored.
https://soccerdata.readthedocs.io/en/latest/
Other
619 stars 105 forks source link

[FBRef] read_team_match_stats does not work #657

Closed ArsendiMattia closed 3 months ago

ArsendiMattia commented 3 months ago

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.

ArsendiMattia commented 3 months ago

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

ArsendiMattia commented 3 months ago

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)