Skip to content

[Understat] Team's stat unable to be read #904

@maris-volk

Description

@maris-volk

Describe the bug
Unable to scrape the schedule from Understat. Either the data doesn't arrive at all, or there's a KeyError - 'statData'.

Affected scrapers
This affects the following scrapers:

  • Understat

Code example

import soccerdata as sd
understat = sd.Understat(leagues='GER-Bundesliga', seasons='2526', no_cache=True)
match_data = understat.read_team_match_stats()

Error message

process data for Bundesliga..
[12/09/25 07:52:00] INFO     Saving cached data to               _common.py:263
                             C:\Users\MarsVilo\soccerdata\data\U               
                             nderstat                                          
error while process Bundesliga: 'statData'

or

Traceback (most recent call last):
  ———
  File "...\site-packages\soccerdata\understat.py", line 144, in read_seasons
    league_data = data["statData"]
                  ~~~~^^^^^^^^^^^^
KeyError: 'statData'

Additional context
Literally less than a day ago everything was working.

Contributor Action Plan

  • I’m not able to fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions