Closed nau7ic closed 4 years ago
Python Version 3.6.8
pip show leaguepedia_parser Name: leaguepedia-parser Version: 0.3.0
This version is obsolete, please use the alpha version with pip install leaguepedia-parser==1.0a11
Sorry about that, I need to finish a few things before properly releasing the new version.
When i use get_games i get an the following error:
Exception has occurred: APIError ('internal_api_error_MWException', '[d64b265351570c9f6ad93615] Exception caught: Error: No field named "Team1Names" found for any of the specified database tables.', 'MWException at /home/hydra/public_html/extensions/Cargo/includes/CargoSQLQuery.php(665)\n#0 /home/hydra/public_html/extensions/Cargo/includes/CargoSQLQuery.php(682): CargoSQLQuery->getDescriptionAndTableNameForField(string)\n#1 /home/hydra/public_html/extensions/Cargo/includes/CargoSQLQuery.php(72): CargoSQLQuery->setDescriptionsAndTableNamesForFields()\n#2 /home/hydra/public_html/extensions/Cargo/api/CargoQueryAPI.php(31): CargoSQLQuery::newFromValues(string, string, string, NULL, NULL, NULL, string, integer, integer)\n#3 /home/hydra/public_html/includes/api/ApiMain.php(1593): CargoQueryAPI->execute()\n#4 /home/hydra/public_html/includes/api/ApiMain.php(531): ApiMain->executeAction()\n#5 /home/hydra/public_html/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()\n#6 /home/hydra/public_html/api.php(87): ApiMain->execute()\n#7 {main}')
Here is my code
import leaguepedia_parser import csv import json import pandas as pd import timing
lp = leaguepedia_parser.LeaguepediaParser()
infos = ['team1', 'team2', 'winner', 'team1_bans', 'team2_bans', 'team1_picks', 'team2_picks', 'team1_names', 'team2_names'] tournaments = [] games = [] regions = lp.get_tournament_regions() regions.remove('') regions.remove('Unknown') regions.remove('Africa') results = []
for region in regions: tournaments.append(lp.get_tournaments(region))
print(lp.get_games('LCK 2020 Spring')) #This is just to Test the get_games