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
529 stars 90 forks source link

[WhoScored] Error for 23-24 season #342

Closed clairesecehDS closed 10 months ago

clairesecehDS commented 10 months ago

Hi all,

I'm trying to scrap the 2023/2024 season data on whoscored and I have this issue:

KeyError:
None of [MultiIndex([('ENG-Premier League', '2324')],
           names=['league', 'season'])] are in the [index]

Any idea how to resolve that?

Thanks!

probberechts commented 10 months ago

This is probably related to #97 and can be solved by invalidating the cache:

import soccerdata as sd
ws = sd.WhoScored(leagues='ENG-Premier League', seasons='2023-24', no_cache=True)
ws.read_schedule()
clairesecehDS commented 10 months ago

That works fine! Thanks for your very fast answer!