Open
Conversation
When _get_id_from_team or _get_teams_from_conference are called with a season that has no data in the team map (e.g. 2026 before ESPN publishes it), process.extractOne returns None on an empty choices list. Unpacking None raises a cryptic TypeError. Now raises a clear ValueError with the requested season and available seasons listed, for both team and conference lookup paths.
Author
|
I also have a few runtime bugs that I fixed locally, let me know if you want a PR for those or prefer the fewer changes the better. |
Owner
|
@mborrus yes you can do a PR that I can review for those other bugs! I've been busy so I'm just now getting around to this, hoping to have a new version out in the next few days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
each year, there is new team data which relies on static csvs.
This pr allows for a fallback catch if the data hasn't been updated under the idea that most teams and conferences don't change YOY.
I also added the script I used to scrape the 2026 data since 2027 is just around the corner. Feel free to drop that if you don't want your repo clogged up.
Changes this year:
Finally, added 2 new tests for this.
Let me know if you prefer to handle these issues yourself and would prefer me to just file an issue in the future.