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

schedule_and_record keeps throwing an error #339

Closed
teagenwilliams opened this issue Mar 13, 2023 · 9 comments
Closed

schedule_and_record keeps throwing an error #339

teagenwilliams opened this issue Mar 13, 2023 · 9 comments

Comments

@teagenwilliams
Copy link

I was using to schedule_and_record() to retrieve individual game data for the 2022 season. It was working without any issues then all of a sudden start throwing:
"ValueError: Data cannot be retrieved for this team/year combo. Please verify that your team abbreviation is accurate and that the team existed during the season you are searching for."

I am not sure what the problem is since the arguments I am inputing have not changed. Any help to fix this would be appreciated.

@tjburch
Copy link
Collaborator

tjburch commented Mar 13, 2023

Can you post the call that throws the error (e.g. what team/date combo?)

@teagenwilliams
Copy link
Author

image

@teagenwilliams
Copy link
Author

image

Even the example in the write up is throwing the error

@tjburch
Copy link
Collaborator

tjburch commented Mar 13, 2023

It looks like it's not retrieving the table at all. Did you run this in a loop in the last hour or so? I can test later but I would bet that you hit the request limit. If you do it more than once, they'll often block you for an hour or so

@teagenwilliams
Copy link
Author

That's probably my issue. Thanks!

@tjburch
Copy link
Collaborator

tjburch commented Mar 13, 2023

You can add sleeps to prevent. The most recent version introduced a session manager to try to prevent this from happening. Have you updated to 2.2.5 yet?

@teagenwilliams
Copy link
Author

I'm not sure if I was before, but I am now

@teagenwilliams
Copy link
Author

Adding the sleeps fixed the issue. Thanks again

@tjburch
Copy link
Collaborator

tjburch commented Mar 13, 2023

Did it persist in 2.5.5 before the sleeps? Glad you got it sorted out.

@tjburch tjburch closed this as completed Mar 14, 2023
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