sportsipy icon indicating copy to clipboard operation
sportsipy copied to clipboard

NHL Boxscore error

Open zwag20 opened this issue 2 years ago • 0 comments

Describe the bug When I run the dataframe on an nhl boxscore I get the following error:

Traceback (most recent call last): File "", line 1, in File "C:\Users\myuser\Miniconda3\lib\site-packages\sportsipy\nhl\boxscore.py", line 723, in dataframe 'losing_abbr': self.losing_abbr, File "C:\Users\myuser\Miniconda3\lib\site-packages\sportsipy\nhl\boxscore.py", line 840, in losing_abbr return utils._parse_abbreviation(self._away_name) File "C:\Users\myuser\Miniconda3\lib\site-packages\sportsipy\utils.py", line 151, in _parse_abbreviation abbr = re.sub(r'/[0-9]+..htm.', '', uri_link('a').attr('href')) File "C:\Users\myuser\Miniconda3\lib\re.py", line 210, in sub return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or bytes-like object

To Reproduce Sample code which causes an issue.

from sportsipy.nhl.boxscore import Boxscore
game = Boxscore('202210120CAR')
game.dataframe

Expected behavior A Dataframe should be populated

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

zwag20 avatar Nov 28 '22 22:11 zwag20