Skip to content
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

get_upcoming_data fails when initializing FanDuel object #66

Open
mattsavoca opened this issue Dec 23, 2024 · 0 comments
Open

get_upcoming_data fails when initializing FanDuel object #66

mattsavoca opened this issue Dec 23, 2024 · 0 comments

Comments

@mattsavoca
Copy link

mattsavoca commented Dec 23, 2024

Initializing a FD object is failing. It logs in correctly - or it least shows a successful login console response. Credentials (user/pw), x-auth and basic-auth are updated/all correct.

I have upcoming contests with players, and initializing the this process was successful as recent as yesterday.

KeyErrorTraceback (most recent call last)
Cell In[6], line 1
----> 1 fd_instance = sp.Fanduel(fanduel_email=fd_email, fanduel_password=fd_pw, basic_auth_token=basic_auth_token, session_auth_token=x_auth_token)

File [C:\Python311\lib\site-packages\southpaw\fanduel.py:276](file:///C:/Python311/lib/site-packages/southpaw/fanduel.py#line=275), in Fanduel.__init__(self, fanduel_email, fanduel_password, basic_auth_token, session_auth_token)
    274 self.fanduel_headers = self.__create_fanduel_headers()
    275 self.__authenticate()
--> 276 self.upcoming = self.__get_upcoming_data()

File [C:\Python311\lib\site-packages\southpaw\fanduel.py:489](file:///C:/Python311/lib/site-packages/southpaw/fanduel.py#line=488), in Fanduel.__get_upcoming_data(self)
    484 for i in entries_response['fixture_lists']:
    485     players_response = requests.get(
    486         i['players']['_url'],
    487         headers=self.fanduel_headers).json()
    488     player_lists.append(PlayerList({"fixture_list_id": i["id"], "players": [Player(player)
--> 489                                                                             for player in players_response['players']]}))
    490 return Upcoming({"entries": [Entry(entry)
    491                              for entry in entries_response['entries']],
    492                 "contests": [Contest(contest)
   (...)
    502                  "player_lists": player_lists
    503                  })

KeyError: 'players'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant