jldbc / jldbc/pybaseball

team_batting_bref() and team_pitching_bref() not working

Open
#461 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

team_batting_bref() and team_fielding_bref do not function properly when given a valid team abbreviation and season(s). All calls return the error, `IndexError: list index out of range`, due to an attempt at slicing the variable, table, which does not properly return any tables.

Source of error in team_batting.py:
![image](https://github.com/user-attachments/assets/84362393-ad28-4578-b432-4f2329ab218e)

Source of error in team_pitching.py:
![image](https://github.com/user-attachments/assets/8b24ee1f-ffc8-4da9-b784-c8a06d5f6112)

Contributor guide

Open the contributing guide

Research direction

Start with team_batting.py and team_pitching.py, focusing on team_batting_bref() and team_pitching_bref() where the table variable is sliced. Reproduce the IndexError using a valid team abbreviation and season or seasons. Done means both functions return the expected team statistics instead of failing because no tables were found.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.