understatr icon indicating copy to clipboard operation
understatr copied to clipboard

Error in get_league_team_stats

Open vibhormbic91 opened this issue 3 years ago • 6 comments

get_league_team_stats(league_name = 'Ligue 1', year = 2020) throws this error:

Error in rbind(deparse, level, ...) : numbers of columns of arguments do not match.

vibhormbic91 avatar Sep 07 '20 13:09 vibhormbic91

same issue for teams and for players, get_team_players_stats(team_name = "Atletico Madrid", year = 2020) Error: lexical error: invalid char in json text. NA (right here) ------^

davidfombella avatar Sep 18 '20 14:09 davidfombella

also with 2020/21 EPL get_league_teams_stats(league_name = "EPL", year = 2020) Error in rbind(deparse.level, ...) : numbers of columns of arguments do not match

maomontes avatar Sep 20 '20 22:09 maomontes

any update? thanks

davidfombella avatar Sep 28 '20 11:09 davidfombella

I cant recreate your error @vibhormbic91. Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.

@davidfombella file a new issue and do the same.

ewenme avatar Nov 15 '20 16:11 ewenme

This error was showing up early in the season because not all teams had played a game till then. For the teams that hadn't played a game, their row in teams data was empty. So, the rbind (github.com/ewenme/understatr/master/R/leagues.R#L119) was throwing up an error.

vibhormbic91 avatar Nov 15 '20 17:11 vibhormbic91

Gotcha. I'll try and catch this for future seasons when I get a chance.

ewenme avatar Nov 16 '20 17:11 ewenme