Skip to content

Problem with ff_transactions() and Sleeper FA add #246

@christianlohr9

Description

@christianlohr9

Describe the bug
I wanted to scrape all transactions from a sleeper league, but unfortunately I get the below mentioned error.
It seems to work on results 1-135, so there might be a problem with 136. What would be a usual FA add. I don't get it :(

Reprex
Please provide a short, reproducible example of the code you are trying to run.
For more on reprexes, check out https://reprex.tidyverse.org

library(tidyverse)
#> Warning: package 'tibble' was built under R version 4.0.4
#> Warning: package 'tidyr' was built under R version 4.0.4
#> Warning: package 'dplyr' was built under R version 4.0.4
library(ffscrapr)
#> Warning: package 'ffscrapr' was built under R version 4.0.4

user_leagues <- sleeper_userleagues("Templer",2020)

league_id <- user_leagues %>% 
  filter(league_name == "Down Set Dynasty") %>% 
  pull(league_id)

league <- sleeper_connect(season = 2020, league_id = league_id)

transactions <- ff_transactions(league)
#> Error: Problem with `mutate()` input `dropped`.
#> x Result 136 must be a single string, not a character vector of length 2
#> i Input `dropped` is `purrr::map_chr(.data$dropped, ~replace(.x, is.null(.x), NA_character_))`.

Created on 2021-04-01 by the reprex package (v0.3.0)

Expected behavior
I expected to somehow get a dataframe with all transactions of my league, clustered to trades an waivers.

Session information
Please copy the output of sessionInfo() into the box below.

sessionInfo()
#> R version 4.0.3 (2020-10-10)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19042)
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=English_Germany.1252  LC_CTYPE=English_Germany.1252   
#> [3] LC_MONETARY=English_Germany.1252 LC_NUMERIC=C                    
#> [5] LC_TIME=English_Germany.1252    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#> [1] httr_1.4.2           sass_0.3.1           bit64_4.0.5         
#> [4] jsonlite_1.7.2       R.utils_2.10.1       modelr_0.1.8        
#> [7] bslib_0.2.4          shiny_1.6.0          assertthat_0.2.1    
#> [10] askpass_1.1          billboarder_0.3.0    blob_1.2.1          
#> [13] cellranger_1.1.0     pillar_1.5.1         RSQLite_2.2.1       
#> [16] backports_1.2.0      glue_1.4.2           digest_0.6.27       
#> [19] checkmate_2.0.0      promises_1.1.1       rvest_0.3.6         
#> [22] colorspace_2.0-0     htmltools_0.5.1.1    httpuv_1.5.4        
#> [25] R.oo_1.24.0          clipr_0.7.1          pkgconfig_2.0.3     
#> [28] scrypt_0.1.3         broom_0.7.3          haven_2.3.1         
#> [31] shinymanager_1.0.300 ratelimitr_0.4.1     xtable_1.8-4        
#> [34] scales_1.1.1         processx_3.4.5       whisker_0.4         
#> [37] later_1.1.0.1        openssl_1.4.3        generics_0.1.0      
#> [40] ellipsis_0.3.1       DT_0.16              withr_2.4.1         
#> [43] cli_2.3.1            magrittr_2.0.1       crayon_1.4.1        
#> [46] readxl_1.3.1         mime_0.10            ps_1.5.0            
#> [49] evaluate_0.14        memoise_1.1.0        R.methodsS3_1.8.1   
#> [52] fs_1.5.0             fansi_0.4.2          xml2_1.3.2          
#> [55] tools_4.0.3          hms_0.5.3            lifecycle_1.0.0     
#> [58] munsell_0.5.0        reprex_0.3.0         callr_3.5.1         
#> [61] compiler_4.0.3       jquerylib_0.1.3      rlang_0.4.10        
#> [64] grid_4.0.3           rstudioapi_0.13      htmlwidgets_1.5.3   
#> [67] rmarkdown_2.6        gtable_0.3.0         DBI_1.1.0           
#> [70] curl_4.3             R6_2.5.0             lubridate_1.7.10    
#> [73] knitr_1.30           fastmap_1.0.1        bit_4.0.4           
#> [76] utf8_1.1.4           stringi_1.5.3        Rcpp_1.0.6          
#> [79] vctrs_0.3.6          xfun_0.19            dbplyr_2.0.0        
#> [82] tidyselect_1.1.0

Created on 2021-04-01 by the reprex package (v0.3.0)

Many thanks Tan!!!

Best regards,
Christian

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions