nflverse / nflreadr

Efficiently download nflverse data
https://nflreadr.nflverse.com/
Other
60 stars 12 forks source link

Unable to load_pbp() with qs::qdeserialize() #30

Closed rplainsw closed 3 years ago

rplainsw commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

Reprex

nflreadr::load_pbp(2020)
#> Warning: Failed to parse file with qs::qdeserialize() from <https://github.com/
#> nflverse/nflfastR-data/raw/master/data/play_by_play_2020.qs>
#> # A tibble: 0 x 0

Created on 2021-08-09 by the reprex package (v2.0.0)

Expected behavior Issue trying to load in pbp_data. This was my first attempt at using nflreadr.

Session information

sessionInfo()
#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19042)
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=English_United States.1252 
#> [2] LC_CTYPE=English_United States.1252   
#> [3] LC_MONETARY=English_United States.1252
#> [4] LC_NUMERIC=C                          
#> [5] LC_TIME=English_United States.1252    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] ps_1.6.0          digest_0.6.27     withr_2.4.2       magrittr_2.0.1   
#>  [5] reprex_2.0.0      evaluate_0.14     highr_0.9         stringi_1.6.2    
#>  [9] rlang_0.4.11      cli_2.5.0         rstudioapi_0.13   fs_1.5.0         
#> [13] rmarkdown_2.8     tools_4.1.0       stringr_1.4.0     glue_1.4.2       
#> [17] xfun_0.23         yaml_2.2.1        compiler_4.1.0    htmltools_0.5.1.1
#> [21] knitr_1.33

Created on 2021-08-09 by the reprex package (v2.0.0)

First time submitting an issue, so apologies if I am missing anything but happy to include whatever else is needed.

tanho63 commented 3 years ago

Hmm! Can you run library(nflreadr) and then paste sessionInfo() again?

rplainsw commented 3 years ago

Restarting R session...

library(nflreadr) sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] nflreadr_1.0.0

loaded via a namespace (and not attached): [1] compiler_4.1.0 fastmap_1.1.0 tools_4.1.0 memoise_2.0.0 cachem_1.0.5 rlang_0.4.11

tanho63 commented 3 years ago

Hmm, it looks like qs isn't installed properly on your machine... what happens with install.packages("qs")?

rplainsw commented 3 years ago

I installed library(qs), still not working. Is that the only one with qs? I've tested several of the other funcitons, load_pbp() is the only one not working. They warning message is still the same.

tanho63 commented 3 years ago

Hmm, I'm surprised it let you install the package with qs being broken.

You can work around this by specifying rds:

nflreadr::load_pbp(seasons = 2020, file_type = "rds")

or using

options(nflreadr.prefer = "rds")

and then running load_pbp()

rplainsw commented 3 years ago

Thank you that works! Not sure what is up with qs, it didn't work on another machine either

tanho63 commented 3 years ago

Great!

jaredfeldman commented 1 year ago

I am having the same issue running nflreadr::load_pbp(1999:2022) for each year. A colleague of mine is able to run successfully. I followed all steps above but I am still receiving the same error.

tanho63 commented 1 year ago

Can you please open a new GitHub ticket and provide all parts of the form, including sitrep? https://github.com/nflverse/nflreadr/issues/new/choose