Closed mcefis closed 12 months ago
Please install the latest version of worldfootballR
(with remotes::install_github("JaseZiv/worldfootballR")
) and let me know if you have the same issue.
I can't seem to replicate your issue with the latest version of the package.
library(worldfootballR)
packageVersion("worldfootballR")
#> [1] '0.6.3.8'
Eredivisie_fotmob_rating <- fotmob_get_season_stats(
country = "NED",
league_name = "Eredivisie",
season_name = "2021/2022",
stat_name = "Assists",
team_or_player = "player"
)
dim(Eredivisie_fotmob_rating)
#> [1] 236 20
library(worldfootballR) packageVersion("worldfootballR") [1] ‘0.6.3.8’
1)Team stats
SerieA_team_stats_22_23 = fotmob_get_season_stats(
- country = "ITA",
- league_name = "Serie A",
- season_name = "2022/2023",
- stat_name = "xG conceded",
- team_or_player = "team"
) Error: no applicable method for 'distinct' applied to an object of class "list"
Let me know, many thanks
the message that you see is because .fotmob_get_stat_and_season_options()
tries to scrape data for 2023/24 since the season option is shown in the menu, but there is no data yet for it (here). i can eliminate the message by setting quiet = TRUE
here to prevent confusion.
in reality, you should still be getting a valid result from your function call despite the error message. observe that i get a 20-row dataframe back from the function call.
library(worldfootballR)
packageVersion("worldfootballR")
#> [1] '0.6.3.8'
res <- fotmob_get_season_stats(
country = "ITA",
league_name = "Serie A",
season_name = "2022/2023",
stat_name = "xG conceded",
team_or_player = "team"
)
#> Error: no applicable method for 'distinct' applied to an object of class "list"
dim(res)
#> [1] 20 20
i may tackle this issue this weekend, but, as i've noted, you should still be getting valid data from the function call.
You're right, it was a refuse: now it works! Many thanks
Good morning,
I had a problem with web scraping from FotMob; here below the warning:
**> Eredivisie_fotmob_rating <- fotmob_get_season_stats(
) Error in
map2()
: ℹ In index: 1. Caused by error inpmap()
: ℹ In index: 1. Caused by error in.fotmob_get_stat_and_season_options()
: ! Can't find season stats data. Failed with the following error: Can't find season stats data. Failed with the following error: Runrlang::last_trace()
to see where the error occurred. Warning message: In sprintf("Can't find season stats data. Failed with the following error:\n", : one argument not used by format 'Can't find season stats data. Failed with the following error: '**I have installed the last version of the library (worldfootballR_0.6.2). How can I fix this problem?
Let me know, many thanks.
Best regards, Mattia