fflr
fflr copied to clipboard
team_roster fails to run for certain week in leagueHistory
When I use the team_roster function for a certain week in leagueHistory I get a weird error that states that one of the vectors within the function returns a length of 0
leagueId = 1725223668
options(fflr.leagueId = leagueId)
test <- team_roster( leagueHistory = TRUE, scoringPeriodId = 8)
# print(test)
Do you know which year your league started? This will sometimes happen using leagueHistory = TRUE on leagues that operated before 2018 as ESPN seems to remove some of that historical data.
I tried looping through previous years for your league
for (y in 2020:2024) {
team_roster(
leagueId = 1725223668,
seasonId = y,
scoringPeriodId = 8
)
}
But I received an error for every year besides 2024 that I can't replicate on my own league
Error: ESPN Fantasy API request failed [401]
You are not authorized to view this League.
2024 works but past years do not. I will have to dig into this more.
I believe the league started in 2021. I did some digging and it is failing on 2023 week 8 which is strange. It also looks like it has something to do with player data for either Tommy Devito or Sam Howell not sure which. I don’t know why it won’t let you view the league as I’ve been able to see it.
On Wed, Nov 27, 2024 at 11:47 AM Kiernan Nicholls @.***> wrote:
Do you know which year your league started? This will sometimes happen using leagueHistory = TRUE on leagues that operated before 2018 as ESPN seems to remove some of that historical data.
I tried looping through previous years for your league
for (y in 2020:2024) { team_roster( leagueId = 1725223668, seasonId = y, scoringPeriodId = 8 ) }
But I received an error for every year besides 2024 that I can't replicate on my own league
Error: ESPN Fantasy API request failed [401] You are not authorized to view this League.
2024 works but past years do not. I will have to dig into this more.
— Reply to this email directly, view it on GitHub https://github.com/k5cents/fflr/issues/49#issuecomment-2504342625, or unsubscribe https://github.com/notifications/unsubscribe-auth/BM7CYQYQ64FUF2DIIN7JIR32CXZRXAVCNFSM6AAAAABSRIKF32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGM2DENRSGU . You are receiving this because you authored the thread.Message ID: @.***>