AssertionError / BadCredentialsException with retrosheet.events() due to GH_TOKEN when processing local Retrosheet files
Open
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
When calling pybaseball.retrosheet.events(year, type='regular') to process locally stored (but not pre-parsed by an external Chadwick install) Retrosheet event files, the function attempts to initialize PyGithub and make authenticated calls to the GitHub API. This leads to an AssertionError if os.environ['GH_TOKEN'] is not set or is empty, or a github.GithubException.BadCredentialsException: 401 if a dummy token is provided. This occurs even if the intention is to only parse local files without needing to download Chadwick or other resources from GitHub.
Contributor guide
Assessment
This issue has not been assessed yet.