mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-26 02:25:51 +03:00
[GH-ISSUE #601] Cannot retrieve data from Custom League #110
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#110
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 @pranavm28 on GitHub (May 30, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/601
ValueError:
Invalid league 'ARG-Liga Profesional'. Valid leagues are:
['ENG-Premier League',
'ESP-La Liga',
'FRA-Ligue 1',
'GER-Bundesliga',
"INT-Women's World Cup",
'INT-World Cup',
'ITA-Serie A']
This is the error that I am getting. It's the same even if I try to scrape for the Brazilian league or the Portuguese league.
Here is my league_dict:
|
LEAGUE_DICT = {
"ENG-Premier League": {
"ClubElo": "ENG_1",
"MatchHistory": "E0",
"FiveThirtyEight": "premier-league",
"FBref": "Premier League",
"ESPN": "eng.1",
"SoFIFA": "[England] Premier League",
"WhoScored": "England - Premier League",
"season_start": "Aug",
"season_end": "May",
},
"ESP-La Liga": {
"ClubElo": "ESP_1",
"MatchHistory": "SP1",
"FiveThirtyEight": "la-liga",
"FBref": "La Liga",
"ESPN": "esp.1",
"SoFIFA": "[Spain] La Liga",
"WhoScored": "Spain - LaLiga",
"season_start": "Aug",
"season_end": "May",
},
"ITA-Serie A": {
"ClubElo": "ITA_1",
"MatchHistory": "I1",
"FiveThirtyEight": "serie-a",
"FBref": "Serie A",
"ESPN": "ita.1",
"SoFIFA": "[Italy] Serie A",
"WhoScored": "Italy - Serie A",
"season_start": "Aug",
"season_end": "May",
},
"GER-Bundesliga": {
"ClubElo": "GER_1",
"MatchHistory": "D1",
"FiveThirtyEight": "bundesliga",
"FBref": "Fußball-Bundesliga",
"ESPN": "ger.1",
"SoFIFA": "[Germany] Bundesliga",
"WhoScored": "Germany - Bundesliga",
"season_start": "Aug",
"season_end": "May",
},
"FRA-Ligue 1": {
"ClubElo": "FRA_1",
"MatchHistory": "F1",
"FiveThirtyEight": "ligue-1",
"FBref": "Ligue 1",
"ESPN": "fra.1",
"SoFIFA": "[France] Ligue 1",
"WhoScored": "France - Ligue 1",
"season_start": "Aug",
"season_end": "May",
},
"INT-World Cup": {
"FBref": "FIFA World Cup",
"WhoScored": "International - FIFA World Cup",
},
"ARG-Liga Profesional": {
"WhoScored":"Argentina - Liga Profesional"
},
"BRA-Brasileirao": {
"WhoScored":"Brazil - Brasileirão",
"season_start": "Apr",
"season_end": "Dec",
},
"POR-Liga Portugal": {
"WhoScored":"Portugal - Liga Portugal",
"season_start": "Aug",
"season_end": "May",
}
}
Seems like any new league that I am adding to the dictionary isn't being read. Or maybe I am making a huge mistake somewhere.
Please help me in resolving this and thanks in advance!
@probberechts commented on GitHub (May 30, 2024):
league_dict.jsonfile. This file is parsed during the module's import.league_dict.jsonfile is at the correct location. If so, you should see this appear in the log messages.If that doesn't work, you probably made a mistake in the syntax of your
league_dict.jsonfile@pranavm28 commented on GitHub (May 30, 2024):
Fixed! Thanks a lot, Rob!