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 retrieving data from empty pages #172

Merged
merged 1 commit into from
Aug 19, 2019

Conversation

roclark
Copy link
Owner

@roclark roclark commented Aug 18, 2019

Occasionally, such as right before the beginning of a season, a page will return a valid response but will have no data outside of the default HTML and CSS template. With no data present on the page, sportsreference can't parse any information and should indicate the lack of data and return safely.

Fixes #164

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

@roclark roclark added the bug Something isn't working label Aug 18, 2019
@roclark roclark added this to the Release 0.4.4 milestone Aug 18, 2019
@roclark roclark self-assigned this Aug 18, 2019
@roclark roclark force-pushed the patch/fix-issue-pulling-teams-with-no-data branch from d933112 to 17b23d0 Compare August 19, 2019 00:20
Occasionally, such as right before the beginning of a season, a page
will return a valid response but will have no data outside of the
default HTML and CSS template. With no data present on the page,
sportsreference can't parse any information and should indicate the lack
of data and return safely.

Signed-Off-By: Robert Clark <robdclark@outlook.com>
@roclark roclark force-pushed the patch/fix-issue-pulling-teams-with-no-data branch from 17b23d0 to f4f14c7 Compare August 19, 2019 00:53
@roclark roclark merged commit 8037ca1 into master Aug 19, 2019
@roclark roclark deleted the patch/fix-issue-pulling-teams-with-no-data branch August 19, 2019 01:51
@codecov
Copy link

codecov bot commented Aug 19, 2019

Codecov Report

Merging #172 into master will decrease coverage by 0.15%.
The diff coverage is 64.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   99.97%   99.82%   -0.16%     
==========================================
  Files          43       43              
  Lines        9242     9281      +39     
==========================================
+ Hits         9240     9265      +25     
- Misses          2       16      +14
Impacted Files Coverage Δ
sportsreference/mlb/teams.py 100% <100%> (ø) ⬆️
sportsreference/ncaaf/teams.py 100% <100%> (ø) ⬆️
sportsreference/nba/teams.py 100% <100%> (ø) ⬆️
sportsreference/nfl/teams.py 100% <100%> (ø) ⬆️
sportsreference/ncaab/teams.py 100% <100%> (ø) ⬆️
sportsreference/nhl/teams.py 100% <100%> (ø) ⬆️
sportsreference/ncaab/schedule.py 98.99% <33.33%> (-1.01%) ⬇️
sportsreference/nfl/schedule.py 99.13% <33.33%> (-0.87%) ⬇️
sportsreference/mlb/schedule.py 98.87% <33.33%> (-1.13%) ⬇️
sportsreference/nhl/schedule.py 99.01% <33.33%> (-0.99%) ⬇️
... and 3 more

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 cc02f21...f4f14c7. Read the comment docs.

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.

from sportsreference.nfl.teams import Teams returns TypeError: 'NoneType' object is not iterable
1 participant