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

[Bug] Team key does not exist (for a league I'm not even in...) #54

Open
ijcd opened this issue Feb 26, 2024 · 0 comments
Open

[Bug] Team key does not exist (for a league I'm not even in...) #54

ijcd opened this issue Feb 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ijcd
Copy link

ijcd commented Feb 26, 2024

Description of Issue

I am using the examples from the getting started docs. When I try to list the league ids, I get this very specific error:

% python3 ./quickstart.py
2024-02-26 03:05:01.035 - ERROR - query.py - yfpy.query:205 - Attempt to retrieve data at URL https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;codes=nhl/teams/?format=json failed with error: "Team key 39.l.32941.t.10 does not exist."
Traceback (most recent call last):
  File "/Users/ijcd/work/fantasy/trials/yfpy/./quickstart.py", line 290, in <module>
    print(repr(yahoo_query.get_user_teams()))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yfpy/query.py", line 967, in get_user_teams
    return self.query(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yfpy/query.py", line 263, in query
    response = self.get_response(url)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yfpy/query.py", line 206, in get_response
    raise YahooFantasySportsDataNotFound(error_msg, url=response.url)
yfpy.exceptions.YahooFantasySportsDataNotFound: Attempt to retrieve data at URL https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;codes=nhl/teams/?format=json failed with error: "Team key 39.l.32941.t.10 does not exist."

Additional Information as Applicable

The odd thing about this is that I'm not in this league as near as I can tell. Oddly, though, If I go to this league in NHL, I can see it, but maybe that's just because it is public. This may be a red herring.

https://hockey.fantasysports.yahoo.com/hockey/32941

Yahoo Fantasy Sports League ID

42179

Yahoo Fantasy Sports League Privacy

Private

Operating System/Environment

macOS

Other

It seems like that team ID is for something else... I think the format is Game.l.League.t.Team -- I'm not sure what game 39 is... but it seems that maybe it was MLB 2002? Something very odd is going on here -- I'm worried that there is bad data in the API for my user... no idea how it would have got there or how to fix it -- I can't seem to find this league (unless it is that NHL one... but the league id matches without the game matching...)

@ijcd ijcd added the bug Something isn't working label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants