Skip to content

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

@RhettTitus

Description

@RhettTitus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions