ffverse / ffscrapr

R API Client for Fantasy Football League Platforms
https://ffscrapr.ffverse.com
Other
76 stars 21 forks source link

FFSimulator MFL Bug (Presumably when pulling schedules) #403

Closed mhogan16 closed 11 months ago

mhogan16 commented 11 months ago

Describe the bug I attempted to simulate a random SFB division, but was unable to do so. When prompted to test ff_schedule, I was met with the same error message.

Reprex

> sfb <- mfl_connect(2023,30818)
> 
> sim <- ff_simulate(
+   sfb,
+   n_seasons = 10,
+   n_weeks = 11,
+   best_ball = FALSE,
+   actual_schedule = TRUE
+   )
── Starting simulation 2023-07-31 13:32:12.991302 ───────────────────────────────────────────────────────────
✔ Importing data ... done
Error in (!is.na(full_schedule$spread) | full_schedule$spread == 0) &&  : 
  'length = 132' in coercion to 'logical(1)'
> 
> ff_schedule(sfb)
Error in (!is.na(full_schedule$spread) | full_schedule$spread == 0) &&  : 
  'length = 132' in coercion to 'logical(1)'

Expected behavior I guess I was hoping it would behave as it did last year. Didn't run into any issues in 2022. Tested it with a Sleeper league and it works just fine, so it seems to be MFL-specific.

Session information

── System Info ──────────────────────────────────────────────────────────────────────────────────────────────
• R version 4.3.1 (2023-06-16 ucrt)   • Running under: Windows 10 x64 (build 19045)
── ffverse Packages ─────────────────────────────────────────────────────────────────────────────────────────
• ffscrapr    (1.4.8)  • ffpros        (0.1.5)       
• ffsimulator (1.2.3)  • ffopportunity (0.1.0.06)    
── ffverse Options ──────────────────────────────────────────────────────────────────────────────────────────
• ffpros.include_metadata: FALSE
• ffpros.sport           : nfl
• ffpros.user_agent      : ffpros/0.1.5 R client package https://github.com/ffverse/ffpros
── ffverse Dependencies ─────────────────────────────────────────────────────────────────────────────────────
• askpass    (1.1)     • httr       (1.4.6)  • Rglpk      (0.6-5)   
• assertthat (0.2.1)   • jsonlite   (1.8.7)  • rlang      (1.1.1)   
• backports  (1.4.1)   • lifecycle  (1.0.3)  • slam       (0.1-50)  
• cachem     (1.0.8)   • magrittr   (2.0.3)  • stringi    (1.7.12)  
• checkmate  (2.2.0)   • memoise    (2.0.1)  • stringr    (1.5.0)   
• cli        (3.6.1)   • mime       (0.12)   • sys        (3.4.2)   
• cpp11      (0.4.5)   • nflreadr   (1.3.2)  • tibble     (3.2.1)   
• curl       (5.0.1)   • openssl    (2.1.0)  • tidyr      (1.3.0)   
• data.table (1.14.8)  • pillar     (1.9.0)  • tidyselect (1.2.0)   
• dplyr      (1.1.2)   • pkgconfig  (2.0.3)  • tidytable  (0.10.1)  
• fansi      (1.0.4)   • purrr      (1.0.1)  • utf8       (1.2.3)   
• fastmap    (1.1.1)   • R6         (2.5.1)  • vctrs      (0.6.3)   
• generics   (0.1.3)   • rappdirs   (0.3.3)  • withr      (2.5.0)   
• glue       (1.6.2)   • ratelimitr (0.4.1)    
─────────────────────────────────────────────────────────────────────────────────────────────────────────────