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

Help - {'Error': 'Invalid endpoint'} #41

Closed
StephenDay1 opened this issue Mar 21, 2023 · 1 comment
Closed

Help - {'Error': 'Invalid endpoint'} #41

StephenDay1 opened this issue Mar 21, 2023 · 1 comment

Comments

@StephenDay1
Copy link

Hello, I'm trying to use this library, and I'm running into an issue. I'm wondering if I can come here for help.
It seems like I get {'Error': 'Invalid endpoint'} back anytime I pass an event as a parameter.

Here's what my code looks like.

tba = tbapy.TBA('key')

current_year = tba.status()["current_season"]
team_number = "frc4091"

team_events = tba.team_events(team=team_number, year=current_year)
for event in team_events:
    print("Week %s: %s" % (event["week"], event["name"]))  # prints Week 2: Orlando Regional
    print(tba.event_rankings(event=event))  # prints Rankings({'Error': 'Invalid endpoint'})
    print(tba.team_status(team=team_number, event=event))  # prints Status({'Error': 'Invalid endpoint'})

If someone could explain what's happening I'd appreciate it.

@ErikBoesen
Copy link
Member

Sorry for the naming confusion—the event parameter should in fact be an ID of the event in question, NOT the full event object.

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

2 participants