rdpharr / project_notes

Notes about my data projects
https://rdpharr.github.io/project_notes/
Apache License 2.0
3 stars 3 forks source link

MLB Predictions and Betting Strategy -- NoneType Error #8

Closed lordcor closed 3 years ago

lordcor commented 3 years ago

Hello when running part 5 I am starting to get this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-709ef555244d> in <module>
     10     game = {
     11         'game':{
---> 12             'game_id': s.find('a', text='Preview')['href'][-18:-6],
     13             'is_test':True,
     14             'date': dt.datetime.now().strftime('%A, %B %d, %Y')

TypeError: 'NoneType' object is not subscriptable

This was working perfect yesterday and I am not sure which part of the baseball reference stuff it is no longer liking.