[GH-ISSUE #80] [General] Problem when adding new leagues with league_dict.json #17

Closed
opened 2026-03-02 15:55:03 +03:00 by kerem · 0 comments
Owner

Originally created by @francescozonaro on GitHub (Sep 15, 2022).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/80

I'm having problems adding leagues with the league_dict.json file. Tried with MLS, not working. Tried with the default example provided in the docs, not working.

{
  "NED-Eredivisie": {
    "ClubElo": "NED_1",
    "MatchHistory": "N1",
    "SoFIFA": "Holland Eredivisie (1)",
    "FBref": "Dutch Eredivisie",
    "ESPN": "ned.1",
    "FiveThirtyEight": "eredivisie",
    "WhoScored": "Netherlands - Eredivisie"
    "season_start": "Aug",
    "season_end": "May",
  },
}

Spotted a missing ',' after the "WhoScored" variable, tried adding that, still not working.

When I try to execute

ws = sd.WhoScored(leagues="NED-Eredivisie", seasons=2022, headless=False)

this appears in console

Invalid league 'NED-Eredivisie'. Valid leagues are:
['ENG-Premier League',
 'ESP-La Liga',
 'FRA-Ligue 1',
 'GER-Bundesliga',
 'ITA-Serie A']

so for what I can understand, it doesn't properly add the new league to the list of available leagues. I tried to modify the _config.py file too, adding the league directly to the LEAGUE_DICT var, but wasn't able to solve the issue.

EDIT: closing and reopening the editor with the configuration added directly in the LEAGUE_DICT var fixed it. Still not able to use the league_dict.json file but its probably an error on my end

Originally created by @francescozonaro on GitHub (Sep 15, 2022). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/80 I'm having problems adding leagues with the league_dict.json file. Tried with MLS, not working. Tried with the default example provided in the docs, not working. ``` { "NED-Eredivisie": { "ClubElo": "NED_1", "MatchHistory": "N1", "SoFIFA": "Holland Eredivisie (1)", "FBref": "Dutch Eredivisie", "ESPN": "ned.1", "FiveThirtyEight": "eredivisie", "WhoScored": "Netherlands - Eredivisie" "season_start": "Aug", "season_end": "May", }, } ``` Spotted a missing ',' after the "WhoScored" variable, tried adding that, still not working. When I try to execute `ws = sd.WhoScored(leagues="NED-Eredivisie", seasons=2022, headless=False)` this appears in console ``` Invalid league 'NED-Eredivisie'. Valid leagues are: ['ENG-Premier League', 'ESP-La Liga', 'FRA-Ligue 1', 'GER-Bundesliga', 'ITA-Serie A'] ``` so for what I can understand, it doesn't properly add the new league to the list of available leagues. I tried to modify the _config.py file too, adding the league directly to the LEAGUE_DICT var, but wasn't able to solve the issue. EDIT: closing and reopening the editor with the configuration added directly in the LEAGUE_DICT var fixed it. Still not able to use the league_dict.json file but its probably an error on my end
kerem closed this issue 2026-03-02 15:55:03 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#17
No description provided.