Closed cg86x closed 1 year ago
I have the same issue!
What version of the package do you have? I can't replicate the issue with version 0.6.1.6000
library(worldfootballR)
packageVersion("worldfootballR")
#> [1] '0.6.1.6000'
league_matches <- fotmob_get_league_matches(
country = c("ENG", "GER", "ITA", "FRA", "ESP"),
league_name = c("Premier League", "1. Bundesliga", "Serie A", "Ligue 1", "LaLiga")
)
tail(league_matches)
#> # A tibble: 6 × 8
#> month_key round round_name page_url id home$…¹ away$…² statu…³
#> <chr> <int> <chr> <chr> <chr> <chr> <chr> <lgl>
#> 1 Sunday, 04 June 2023 38 38 /match/39… 3918… Osasuna Girona FALSE
#> 2 Sunday, 04 June 2023 38 38 /match/39… 3918… Real B… Valenc… FALSE
#> 3 Sunday, 04 June 2023 38 38 /match/39… 3918… Real M… Athlet… FALSE
#> 4 Sunday, 04 June 2023 38 38 /match/39… 3918… Real S… Sevilla FALSE
#> 5 Sunday, 04 June 2023 38 38 /match/39… 3918… Real V… Getafe FALSE
#> 6 Sunday, 04 June 2023 38 38 /match/39… 3918… Villar… Atleti… FALSE
#> # … with 11 more variables: home$shortName <chr>, $id <chr>,
#> # away$shortName <chr>, $id <chr>, status$started <lgl>, $cancelled <lgl>,
#> # $scoreStr <chr>, $startDateStr <chr>, $startDateStrShort <chr>,
#> # $reason <df[,2]>, $startTimeStr <chr>, and abbreviated variable names
#> # ¹home$name, ²away$name, ³status$finished
The cran version is '0.6.1' packageVersion("worldfootballR") [1] ‘0.6.1’
Same for me
I restarted R - still got the same error. Then I quit R and reopened - same error. Restarted my computer and relaunched R and it ran without errors. Not sure if that will be a permanent fix but it works for now.
Mac OS 12.3.1 in case that is notable for any future investigation.
I restarted R - still got the same error. Then I quit R and reopened - same error. Restarted my computer and relaunched R and it ran without errors. Not sure if that will be a permanent fix but it works for now.
Mac OS 12.3.1 in case that is notable for any future investigation.
interesting. I would have expected that restarting R + RStudio would have been sufficient.
FWIW i can add some better error handling. from the current error message, it's not obvious the issue is related to JSON data retrieval.
@adlihs can you try downloading the development version of the package with remotes::install_github("JaseZiv/worldfootballR")
, re-starting your R session + RStudio (if you're using it), then re-trying the function call?
i'm aware that this is not the CRAN version. we don't send updates to CRAN every time there is a code change. rather, we wait at least a few weeks so that we don't burden CRAN reviewers too much.
i believe the issue you're facing is due to Fotmob data format changes that occurred after we last submitted to CRAN
It works! PC restarted R restarted RStudio restarted Using the development version
It works! PC restarted R restarted RStudio restarted Using the development version
Awesome. Hopefully we'll be pushing a new version of the package to CRAN soon. I realize that it can be confusing when the version of the package that you get with install.packages()
doesn't work, but the development version does.
Getting the below error with fotmob_get_league_matches().
Things worked fine for months but started to error out ~2 weeks ago.