JaseZiv / worldfootballR

A wrapper for extracting world football (soccer) data from FBref, Transfermark, Understat
https://jaseziv.github.io/worldfootballR/
444 stars 60 forks source link

Error in `.fotmob_get_stat_and_season_options()`: #170

Closed OKcomputer626 closed 1 year ago

OKcomputer626 commented 1 year ago

Hello, I am using the latest version of the worldfootballr package 0.5.12.1000, and I'm encountering an error using the fotmob_get_season_stats() function when extracting Liga MX of unable to retrieve information.

Code: liga_mx <- fotmob_get_season_stats( country = "MEX", league_name = "Liga MX", season = "2022/2023", stat_name = "Expected goals", team_or_player = "team" )

Output: Error in .fotmob_get_stat_and_season_options(): ! Season ids not stored in expected format at https://www.fotmob.com/leagues/230/stats/liga-mx/teams. Run rlang::last_error() to see where the error occurred.

Any help would be appreciated. Thanks, Andres

tonyelhabr commented 1 year ago

Please re-install the package with remotes::install_github("JaseZiv/worldfootballR") and try

liga_mx <- fotmob_get_season_stats(
  country = "MEX",
  league_name = "Liga MX",
  season = "2022/2023-Apertura",
  stat_name = "Expected goals",
  team_or_player = "team"
)
OKcomputer626 commented 1 year ago

It worked! Thanks a lot! @tonyelhabr