Closed OD1995 closed 5 years ago
Hi @OD1995 your swid and espn_s2 are correct else it would have thrown a access denied error. This bug looks like ESPN does not send a deadlineDate field if it is not set in the league. This should be an easy fix. Thank you for reporting this!
I added the fix and tested it. I am going to push a new version of ff_espn_api. Let me know if you run into anymore errors.
I ran into a similar error that says:
File "/Users/kevenrc/Documents/fantasy/ff-espn-api/ff_espn_api/league.py", line 114, in _fetch_teams
if member['id'] == team['owners'][0]:
when trying to create League object.
@cwendt94 Great, all fixed, thanks!
@kevenrc Interesting so you are getting a key error for 'owners'? I will look into that. I would think owners key would always be in the data.
@cwendt94 could it be because I am trying to create the League object on a league that hasn't had a draft yet?
I don't believe so because I can access my 2019 league. Is this a brand new league this year?
@cwendt94 Yes, it's a brand new league this year.
Interesting, I am guessing with brand new leagues owners field is not given. I will look into this and come up with a fix!
Is the league full? This was a bug with espn_ff.
@kevenrc The newest package should work if a team does not have a owner! Let me know if it fixes it and that there is not any other errors!
Attempting to follow this example code:
I got this error:
I'm pretty confident I've got the correct
swid
andespn_s2
values for my league, although myespn_s2
is 300 characters long compared to the example one with 29 characters..