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

overview(game_id) causes XMLSyntaxError #133

Open
eyzae opened this issue Jun 4, 2019 · 2 comments
Open

overview(game_id) causes XMLSyntaxError #133

eyzae opened this issue Jun 4, 2019 · 2 comments

Comments

@eyzae
Copy link

eyzae commented Jun 4, 2019

If I cycle through 'mlbgame.day()' with today's date I receive a list of all the games, including the 'game_id'. If I use that 'game_id' and try and use 'mlbgame.overview(game_id)', I receive the following error:

File "http://gd2.mlb.com/components/game/mlb/year_2019/month_06/day_04/gid_2019_06_04_atlmlb_pitmlb_1/rawboxscore.xml", line 1
lxml.etree.XMLSyntaxError: Space required after the Public Identifier, line 1, column 55

I have tried this with games in the past as well and still receive the same error.

I'm kind of new to Python, so there's a chance I'm doing something wrong.

@Mark-DelGrande
Copy link

I use overview = mlbgame.overview(gameid). The same way you do. I put all my code inside a try because occasionally the XML database is messed up the mlbgame cant pull it.

@eyzae
Copy link
Author

eyzae commented Jun 24, 2019

To get around the issues I was having, without using a try/except, I just commented out the 'raw_box_score' and 'raw_box_score_root' lines in 'game.py' (lines 325, 328, 335, and 336). I haven't had any issues since.

I guess a try/except would be better, I'll go that route in case there are other problems that arise.

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

No branches or pull requests

3 participants