Skip to content

Fix play_by_play crash when parsing 'Time' header rows#324

Open
Jose-M-O wants to merge 1 commit intojaebradley:v4from
Jose-M-O:Open-source-Contribution
Open

Fix play_by_play crash when parsing 'Time' header rows#324
Jose-M-O wants to merge 1 commit intojaebradley:v4from
Jose-M-O:Open-source-Contribution

Conversation

@Jose-M-O
Copy link

The play_by_play() function crashes with: ValueError: time data 'Time' does not match format '%M:%S.%f'
-This happens when Basketball Reference includes header rows with timestamp text "Time" but without the aria-label="Time" attribute.

Added an additional check in has_play_by_play_data() to skip rows where timestamp == 'Time'.

Fixing #229

  • Added regression test in tests/test_playbyplay_time_header.py
  • Verified all play-by-play integration tests still pass
  • Manually tested with real game data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant