mlbgame
mlbgame copied to clipboard
mlbgame.injury() gives AttributeError
Traceback (most recent call last): File "<pyshell#31>", line 1, in <module> mlbgame.injury() File "C:\Users\ME\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mlbgame\__init__.py", line 266, in injury data = mlbgame.info.injury() File "C:\Users\ME\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mlbgame\info.py", line 408, in injury parsed = json.loads(data.read().decode('utf-8')) AttributeError: 'NoneType' object has no attribute 'read'
I looked at this briefly and think this has to do with MLB's lookup service being deprecated. Using the StatsAPI (which replaced the lookup service) might fix this issue.
I looked at this briefly and think this has to do with MLB's lookup service being deprecated. Using the StatsAPI (which replaced the lookup service) might fix this issue.
The StatsAPI? Where can I find this?
I would just look up MLB StatsAPI. I believe you need to request access/make an account, but I don't know if they give it to anyone and everyone. It doesn't hurt to try to get access though.
I would just look up MLB StatsAPI. I believe you need to request access/make an account, but I don't know if they give it to anyone and everyone. It doesn't hurt to try to get access though.
Thanks