mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[GH-ISSUE #354] [FBref] German League 2122: Length of values (53) does not match length of index (54) #68
Labels
No labels
ESPN
FBref
FotMob
MatchHistory
SoFIFA
Sofascore
WhoScored
WhoScored
bug
build
common
dependencies
discussion
documentation
duplicate
enhancement
good first issue
invalid
performance
pull-request
question
question
removal
understat
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/soccerdata#68
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LuisEnriqueKaiser on GitHub (Sep 6, 2023).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/354
Hello everyone,
I want to scrape match data with the fbref.read_team_match_stats() function and it does work good for all leagues except for the german league. More specifically, it does not work for the 21-22 season.
My python version is 3.11 and I am using the latest soccerdata distribution.
I will attach a screenshot of the error message and of my code.
Kind regards
@probberechts commented on GitHub (Sep 6, 2023):
It looks like an inconsistency in the FBref website. The "match_report" stat is missing for some game of some team in the season. You can try to make the following snippet a bit more robust:
github.com/probberechts/soccerdata@f49cdf14fd/soccerdata/fbref.py (L644-L649)@TimelessUsername commented on GitHub (Oct 10, 2023):
Similar issue with WhoScored, I'm currently trying to find out why 21-22 season fails to match the league...
Edit:
As the error is; KeyError: "[('ARG-Liga Profesional', '2122')] not in index", while input years are of the form [15, 16, ... , 20, 21, 22, 23], the string conversion logic seems to fail and thus fail to match the year. The 2122 form needs to be converted to 2022, I recon.
Edit2:
Various issues with different input formats too, the logic needs a bit of work I think.
Edit3: Appears whoscore doesnt have some of the years during the virus...