retrosheet.py returns an error for all functions
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
The Chadwick Baseball Bureau seems to have reorganized their enhanced retrosheet repo. This means some modifications need to be made to retrosheet.py.
Here are the errors for each function:
```
events('2023')
File "...\pybaseball\retrosheet.py", line 130, in events
subtree = repo.get_git_tree(subtree.sha)
^^^^^^^
UnboundLocalError: cannot access local variable 'subtree' where it is not associated with a value
```
```
rosters('2023')
File "...\pybaseball\retrosheet.py", line 164, in rosters
rosters = [t.path for t in repo.get_git_tree(subtree.sha).tree if str(season) in t.path]
^^^^^^^
UnboundLocalError: cannot access local variable 'subtree' where it is not associated with a value
```
```
park_codes()
File "...\pybaseball\retrosheet.py", line 213, in park_codes
data.columns = parkcode_columns
^^^^^^^^^^^^
TypeError: park_codes() takes 0 positional arguments but 1 was given
```
```
schedules('2023'
File "...\pybaseball\retrosheet.py", line 224, in schedules
schedules = [f.path[f.path.rfind('/')+1:] for f in repo.get_contents('schedule')]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
```
season_game_logs('2023')
File "...\pybaseball\retrosheet.py", line 246, in season_game_logs
raise ValueError(f'Season game logs not available for {season}')
ValueError: Season game logs not available for 2023
```
`world_series_logs()`, `all_star_game_logs()`, `wild_card_logs()`, `division_series_logs()`, `division_series_logs()`, and `lcs_logs()` all do not have any output in the terminal and no files are created.
Contributor guide
Assessment
This issue has not been assessed yet.