jldbc / jldbc/pybaseball

AssertionError / BadCredentialsException with retrosheet.events() due to GH_TOKEN when processing local Retrosheet files

Open
#481 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.