Skip to content

ff_scoring() not working for MFL league with thresholdPoints #413

Open
@TheMathNinja

Description

@TheMathNinja

Describe the bug
Running ff_playerscores() now returns an error for my MFL league.

Reprex

library(ffscrapr)
library(nflverse)
library(tidyverse)

FAFL22 <- mfl_connect(season = 2022, league_id = 22686, rate_limit_number = 3, rate_limit_seconds = 6)

ffscrapr::ff_playerscores(FAFL22,
                          season = 2022,
                          week = 1:17)

 # Please include the code used for the connection object from `ff_connect()`

Expected behavior
I expect it to return a df, but I'm getting an error:
Error in dplyr::mutate():
ℹ In argument: rule = purrr::map(.data$rule, parse_rule).
Caused by error in purrr::map():
ℹ In index: 10.
Caused by error in mutate():
ℹ In argument: thresholdPoints = (structure(function (..., .x = ..1, .y = ..2, . = ..1) ....
Caused by error:
! thresholdPoints must be size 12 or 1, not 5.

Session information
Please copy the output of ffscrapr::ffverse_sitrep() into the box below.

Warning: unable to access index for repository https://packagemanager.posit.co/cran/latest/src/contrib:
  cannot open URL 'https://packagemanager.posit.co/cran/latest/src/contrib/PACKAGES'
Warning: unable to access index for repository https://cloud.r-project.org/src/contrib:
  cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'
── System Info ────────────────────────────────────────────────────────────
• R version 4.3.1 (2023-06-16 ucrt) • Running under: Windows 11 x64 (build 22621)
── Package Status ─────────────────────────────────────────────────────────
   package installed  cran      dev behind
1 ffscrapr  1.4.8.11 1.4.8 1.4.8.11       
── Package Options ────────────────────────────────────────────────────────
• No options set for above packages
── Package Dependencies ───────────────────────────────────────────────────
• askpass    (1.1)     • jsonlite   (1.8.7)   • stringr    (1.5.0)  
• assertthat (0.2.1)   • lifecycle  (1.0.3)   • sys        (3.4.2)  
• backports  (1.4.1)   • magrittr   (2.0.3)   • tibble     (3.2.1)  
• cachem     (1.0.8)   • memoise    (2.0.1)   • tidyr      (1.3.0)  
• checkmate  (2.2.0)   • mime       (0.12)    • tidyselect (1.2.0)  
• cli        (3.6.1)   • nflreadr   (1.4.0)   • utf8       (1.2.3)  
• cpp11      (0.4.6)   • openssl    (2.1.0)   • vctrs      (0.6.3)  
• curl       (5.0.2)   • pillar     (1.9.0)   • withr      (2.5.0)  
• data.table (1.14.8)  • pkgconfig  (2.0.3)   • graphics   (4.3.1)  
• dplyr      (1.1.2)   • purrr      (1.0.2)   • grDevices  (4.3.1)  
• fansi      (1.0.4)   • R6         (2.5.1)   • methods    (4.3.1)  
• fastmap    (1.1.1)   • rappdirs   (0.3.3)   • stats      (4.3.1)  
• generics   (0.1.3)   • ratelimitr (0.4.1)   • tools      (4.3.1)  
• glue       (1.6.2)   • rlang      (1.1.1)   • utils      (4.3.1)  
• httr       (1.4.7)   • stringi    (1.7.12)    
── Not Installed ──────────────────────────────────────────────────────────
• ffsimulatorffprosffopportunity  
───────────────────────────────────────────────────────────────────────────

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions