question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError from trying to convert NoneType to int in sportsreference.ncaaf.teams.schedule.dataframe_extended

See original GitHub issue

``Traceback (most recent call last):

`` File “./scrape.py”, line 28, in <module>

`` sched = getScheduleDF(team, yr)

`` File “./scrape.py”, line 15, in getScheduleDF

`` df = sched.dataframe_extended

`` File “/home/chris/.local/lib/python3.6/site-packages/sportsreference/ncaaf/schedule.py”, line 459, in dataframe_extended

`` frames.append(game.dataframe_extended)

File "/home/chris/.local/lib/python3.6/site-packages/sportsreference/ncaaf/schedule.py", line 159, in dataframe_extended return self.boxscore.dataframe File "/home/chris/.local/lib/python3.6/site-packages/sportsreference/ncaaf/boxscore.py", line 240, in dataframe ‘away_first_downs’: self.away_first_downs, File "/home/chris/.local/lib/python3.6/site-packages/sportsreference/ncaaf/boxscore.py", line 374, in away_first_downs return int(self._away_first_downs) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ChrisHeneghancommented, Aug 28, 2018

Yes, I was using the pip package. I don’t know exactly what year it was, but it was from between 2000 and 2017, so not 2018. Just from using this package a little bit this afternoon, I’ve noticed that there are occasional issues where missing data or incorrectly formatted data from Sports-Reference causes issues like this. (For example I ran into some incorrectly formatted dates)

Thank you soooo much by the way for working on the project. It looks promising to be immensely useful to aspiring data scientists/handicappers like me.

0reactions
roclarkcommented, Sep 4, 2018

@ChrisHeneghan just FYI, I created v0.1.1 which is similar to #4 in that it fixes all of the issues I encountered with v0.1.0. The release is now up on PyPI and can be upgraded/re-installed to make use of the fixes. I will still keep #4 open for now in case you have any feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError from trying to convert NoneType to int in ... - GitHub
TypeError from trying to convert NoneType to int in sportsreference.ncaaf.teams.schedule.dataframe_extended #3.
Read more >
How to convert Nonetype to integer? - python - Stack Overflow
Convert all strings in a list to int (10 answers) ... i try convert Nonetype to int. ... TypeError: 'NoneType' object is not...
Read more >
Python: How to convert Nonetype to int or string? - YouTube
This Python error occurs when you are trying to do arithmatic operation with None Type that time you. ... None type error while...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found