-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ff_rosters() not working for ESPN leagures #437
Comments
For more context, this issue is not unique to espn_potentialpoints(conn, week = 1)
# A tibble: 193 × 11
week franchise_id franchise_name franchise_score optimal_slot actual_slot
<int> <int> <chr> <dbl> <chr> <chr>
1 1 1 Pineapple Juice 102. QB QB
2 1 1 Pineapple Juice 102. RB RB
3 1 1 Pineapple Juice 102. RB BE
4 1 1 Pineapple Juice 102. WR BE
5 1 1 Pineapple Juice 102. WR WR
6 1 1 Pineapple Juice 102. TE TE
7 1 1 Pineapple Juice 102. RB/WR/TE RB
8 1 1 Pineapple Juice 102. DST DST
9 1 1 Pineapple Juice 102. K K
10 1 1 Pineapple Juice 102. NA BE
# ℹ 183 more rows
# ℹ 5 more variables: player_score <dbl>, player_name <chr>, player_pos <chr>,
# team <chr>, player_id <int>
# ℹ Use `print(n = ...)` to see more rows
espn_potentialpoints(conn, week = 2)
Error in `map2()`:
ℹ In index: 1.
ℹ With name: 2.
Caused by error in `dplyr::mutate()`:
ℹ In argument: `projected_score = purrr::map2_dbl(...)`.
Caused by error in `purrr::map2_dbl()`:
ℹ In index: 1.
Caused by error in `pluck_raw()`:
! Index 1 must have length 1, not 2.
Run `rlang::last_trace()` to see where the error occurred. |
not quite, potentialpoints calls ff_starters as its very first line |
There's been a bit of ESPN API wonkiness as of late. I encountered this: cwendt94/espn-api#575 |
I wanted to update this to say that The following code # install.packages("ffscrapr", repos = c("https://ffverse.r-universe.dev", getOption("repos")))
library(ffscrapr)
# open espn connection
conn <- espn_connect(
season = Sys.getenv("current_season"),
league_id = Sys.getenv("league_id"),
espn_s2 = Sys.getenv("my_espn_2"),
swid = Sys.getenv("my_swid"),
user_agent = "Name"
)
starters_1 <- ff_starters(conn, week = 1)
starters_2 <- ff_starters(conn, week = 2)
head(starters_1)
head(starters_2) gives me the output # A tibble: 6 × 12
week franchise_id franchise_name franchise_score lineup_slot player_score
<int> <int> <chr> <dbl> <chr> <dbl>
1 1 1 Pineapple Juice 102. QB 14.2
2 1 1 Pineapple Juice 102. RB 10.8
3 1 1 Pineapple Juice 102. RB 26.8
4 1 1 Pineapple Juice 102. WR 8.2
5 1 1 Pineapple Juice 102. WR 3.6
6 1 1 Pineapple Juice 102. TE 8.5
# ℹ 6 more variables: projected_score <dbl>, player_id <int>, player_name <chr>,
# pos <chr>, team <chr>, eligible_lineup_slots <list>
> head(starters_2)
# A tibble: 6 × 12
week franchise_id franchise_name franchise_score lineup_slot player_score
<int> <int> <chr> <dbl> <chr> <dbl>
1 2 1 Pineapple Juice 103. QB 28.5
2 2 1 Pineapple Juice 103. RB 15.5
3 2 1 Pineapple Juice 103. RB 8
4 2 1 Pineapple Juice 103. WR 4.1
5 2 1 Pineapple Juice 103. WR 12.8
6 2 1 Pineapple Juice 103. TE 3.3
# ℹ 6 more variables: projected_score <dbl>, player_id <int>, player_name <chr>,
# pos <chr>, team <chr>, eligible_lineup_slots <list> as expected. |
Great! |
Describe the bug
The
ff_rosters()
function is not working for my ESPN league, and at least one other individual has had this issue.Reprex
Load library and open connection:
I'm using an R project with
current_season
,league_id
,my_espn_2
, andmy_swid
saved to the project's profile.The following code reads my league's rosters for week 1:
However, when doing the same for week 2, I get the following error:
Expected behavior
I expected the function to return my league's starters for week 2, as it did for week 1.
Session information
Please copy the output of
ffscrapr::ffverse_sitrep()
into the box below.The text was updated successfully, but these errors were encountered: