oseymour / ScraperFC

Python package for scraping soccer data from a variety of sources
GNU General Public License v3.0
239 stars 52 forks source link

AttributeError: 'NoneType' object has no attribute 'split' in scrape_shot_xy #16

Closed aegonwolf closed 1 year ago

aegonwolf commented 1 year ago

Module: Understat

Description of problem: trying to scrape using Understat.scrape_shot_xy() I get an error.

Code:

shot_xy = understat.scrape_shot_xy(year=2023, league='EPL')

Error message:

File "Understat.py", line 971, in scrape_shot_xy
    match_id = link.split("/")[-1]
AttributeError: 'NoneType' object has no attribute 'split'

I am guessing a certain match_id does not exist.

oseymour commented 1 year ago

Hey @aegonwolf sorry I never commented on this. I see and it's been on my to-do list. I've been busy, sorry. I think this may have the same root cause as #17.

oseymour commented 1 year ago

v2.3.0 should fix this. Give it a go and let me know if you have any problems!

aegonwolf commented 1 year ago

awesome, thanks, I'll update the package!