Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mlbgame.injury() gives AttributeError #144

Open
VeinyAngus opened this issue Jun 30, 2021 · 4 comments
Open

mlbgame.injury() gives AttributeError #144

VeinyAngus opened this issue Jun 30, 2021 · 4 comments

Comments

@VeinyAngus
Copy link

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'

@VeinyAngus VeinyAngus changed the title mlbgame.injury() gives AttributeError mlbgame.injury() gives AttributeError labels:['bug'] Jun 30, 2021
@VeinyAngus VeinyAngus changed the title mlbgame.injury() gives AttributeError labels:['bug'] mlbgame.injury() gives AttributeError Jun 30, 2021
@Ethan-Park57
Copy link

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.

@VeinyAngus
Copy link
Author

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?

@Ethan-Park57
Copy link

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.

@VeinyAngus
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants