Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue pulling empty NBA roster page #359

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

roclark
Copy link
Owner

@roclark roclark commented Mar 27, 2020

Occasionally, an NBA team's roster page on sports-reference.com will be empty, causing an error to be thrown while attempting to parse the page. Adding an additional check to see if the page is parsable will gracefully handle situations where the page is invalid.

Fixes #337

Signed-Off-By: Robert Clark robdclark@outlook.com

Occasionally, an NBA team's roster page on sports-reference.com will be
empty, causing an error to be thrown while attempting to parse the page.
Adding an additional check to see if the page is parsable will
gracefully handle situations where the page is invalid.

Signed-Off-By: Robert Clark <robdclark@outlook.com>
@roclark roclark added the bug Something isn't working label Mar 27, 2020
@roclark roclark added this to the Release 0.5.1 milestone Mar 27, 2020
@roclark roclark self-assigned this Mar 27, 2020
@codecov
Copy link

codecov bot commented Mar 27, 2020

Codecov Report

Merging #359 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #359   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files          48       48           
  Lines       10549    10549           
=======================================
  Hits        10546    10546           
  Misses          3        3           
Impacted Files Coverage Δ
sportsreference/nba/roster.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f54659d...9ece907. Read the comment docs.

@roclark roclark merged commit 6f1f0d9 into master Mar 27, 2020
@roclark roclark deleted the patch/fix-missing-nba-roster-parser-error branch March 27, 2020 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"lxml.etree.ParserError: Document is empty" when requesting roster of 2018 'CHO' team
1 participant