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 missing NCAAB player weight #357

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

roclark
Copy link
Owner

@roclark roclark commented Mar 26, 2020

Occasionally, some NCAAB players will not have a weight listed on their stats page on sports-reference.com. This will return None for the property in the Player class. While attempting to parse the weight from None, an error will be thrown. Doing a simple check to see if the weight is valid prior to parsing will resolve the issue and allow execution as expected.

Fixes #298

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

Occasionally, some NCAAB players will not have a weight listed on their
stats page on sports-reference.com. This will return `None` for the
property in the Player class. While attempting to parse the weight from
None, an error will be thrown. Doing a simple check to see if the weight
is valid prior to parsing will resolve the issue and allow execution as
expected.

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

codecov bot commented Mar 26, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #357   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files          48       48           
  Lines       10547    10549    +2     
=======================================
+ Hits        10544    10546    +2     
  Misses          3        3           
Impacted Files Coverage Δ
sportsreference/ncaab/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 31dbdaf...2dcff0d. Read the comment docs.

@roclark roclark merged commit b3c1a67 into master Mar 26, 2020
@roclark roclark deleted the patch/fix-nba-missing-weight-error branch March 26, 2020 17:27
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.

player.dataframe fails when weight does not exist
1 participant