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

Resolve errors while pulling empty NBA stats pages #218

Merged
merged 1 commit into from
Oct 4, 2019

Conversation

roclark
Copy link
Owner

@roclark roclark commented Oct 4, 2019

Some players don't have a personal stats page created for them yet, but contain a valid link on roster pages. As implemented, the Roster module for the NBA does not check if the returned data from the page is empty, and will attempt to parse information from an object which is None. Instead, if a player's page is invalid, the module should fail-fast and return None for the player instead of attempting to parse information or handle other scenarios.

Fixes #217

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

@roclark roclark added the bug Something isn't working label Oct 4, 2019
@roclark roclark added this to the Release 0.5.0 milestone Oct 4, 2019
@roclark roclark self-assigned this Oct 4, 2019
@codecov
Copy link

codecov bot commented Oct 4, 2019

Codecov Report

Merging #218 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #218   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files          42       42           
  Lines        9357     9361    +4     
=======================================
+ Hits         9355     9359    +4     
  Misses          2        2
Impacted Files Coverage Δ
sportsreference/nba/roster.py 100% <100%> (ø) ⬆️

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 3838679...c237881. Read the comment docs.

@roclark roclark force-pushed the patch/fix-nba-player-null-pages branch from 1bea117 to 02965de Compare October 4, 2019 23:17
Some players don't have a personal stats page created for them yet, but
contain a valid link on roster pages. As implemented, the Roster module
for the NBA does not check if the returned data from the page is empty,
and will attempt to parse information from an object which is None.
Instead, if a player's page is invalid, the module should fail-fast and
return None for the player instead of attempting to parse information or
handle other scenarios.

Signed-Off-By: Robert Clark <robdclark@outlook.com>
@roclark roclark force-pushed the patch/fix-nba-player-null-pages branch from 02965de to c237881 Compare October 4, 2019 23:34
@roclark roclark merged commit fd5715d into master Oct 4, 2019
@roclark roclark deleted the patch/fix-nba-player-null-pages branch October 4, 2019 23:46
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.

NBA players with empty stats pages throwing errors
1 participant