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 football schedules and rosters #392

Merged
merged 1 commit into from
Apr 11, 2020

Conversation

roclark
Copy link
Owner

@roclark roclark commented Apr 10, 2020

If the Team class for football is unable to pull a team's page, the document for the team will be invalid, and the '_doc' attribute will not exist for that team. While trying to pull the schedule or roster for that team, an error will be thrown that the '_doc' attribute does not
exist.

Simply checking if the attribute exists, and setting it to None if not will allow the Schedule and Roster modules to retry pulling the page again to see if it works.

Fixes #391

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

If the Team class for football is unable to pull a team's page, the
document for the team will be invalid, and the '_doc' attribute will not
exist for that team. While trying to pull the schedule or roster for
that team, an error will be thrown that the '_doc' attribute does not
exist.

Simply checking if the attribute exists, and setting it to None if not
will allow the Schedule and Roster modules to retry pulling the page
again to see if it works.

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

codecov bot commented Apr 10, 2020

Codecov Report

Merging #392 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #392   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files          48       48           
  Lines       10578    10582    +4     
=======================================
+ Hits        10575    10579    +4     
  Misses          3        3           
Impacted Files Coverage Δ
sportsreference/fb/team.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 c5ea9e8...0e5ff70. Read the comment docs.

@roclark roclark merged commit 9b93ce8 into master Apr 11, 2020
@roclark roclark deleted the patch/fix-fb-invalid-schedule branch April 11, 2020 00:11
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.

Error while pulling roster and schedule from football Team class
1 participant