Comments (14)
@gman2691 can you please provide a direct example of where this occurs
from mlbgame.
The teaser code that you posted to find all of the scores in the Mets games.
from mlbgame.
@gman2691 I'm not getting any error, can you please post the error response you are getting?
from mlbgame.
I get this error lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
from mlbgame.
full copy:
Traceback (most recent call last):
File "C:/......../main.py", line 5, in
month = mlbgame.games(2015, 6, home="Mets")
File "C:........._init_.py", line 205, in games
game = day(i, y, x, home=home, away=away)
File "C:.........._init_.py", line 175, in day
data = mlbgame.game.scoreboard(year, month, day, home=home, away=away)
File "C:.................\game.py", line 17, in scoreboard
parsed = etree.parse(data)
File "src\lxml\lxml.etree.pyx", line 3427, in lxml.etree.parse (src\lxml\lxml.etree.c:81101)
File "src\lxml\parser.pxi", line 1811, in lxml.etree._parseDocument (src\lxml\lxml.etree.c:117832)
File "src\lxml\parser.pxi", line 1837, in lxml.etree._parseDocumentFromURL (src\lxml\lxml.etree.c:118179)
File "src\lxml\parser.pxi", line 1741, in lxml.etree._parseDocFromFile (src\lxml\lxml.etree.c:117091)
File "src\lxml\parser.pxi", line 1138, in lxml.etree._BaseParser._parseDocFromFile (src\lxml\lxml.etree.c:111637)
File "src\lxml\parser.pxi", line 595, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\lxml.etree.c:105093)
File "src\lxml\parser.pxi", line 706, in lxml.etree._handleParseResult (src\lxml\lxml.etree.c:106801)
File "src\lxml\parser.pxi", line 635, in lxml.etree._raiseParseError (src\lxml\lxml.etree.c:105655)
File "file:/C:/.................../scoreboard.xml.gz", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
Process finished with exit code 1
from mlbgame.
@jimluke827 I'm not getting that error at all, it could be an issue with lxml. Can you try updating both mlbgame and lxml to the latest version?
from mlbgame.
@zachpanz88 I am at the latest version of each.
from mlbgame.
@zachpanz88 I was using Python 3, I used python 2 and had a ton of trouble getting libxml2 to install, but once I got that all set everything is working
@gman2691 see above if you are using wrong version of python
from mlbgame.
Again, I do not seem to get the error when I am testing with python 3.
File "file:/C:/.................../scoreboard.xml.gz", line 1
@jimluke827 Is there any way you could fill in part of that "......" so I can diagnose what day the information is coming from? I just need the "month_06/day_xx/" part.
Just to be clear, we are talking about this example, correct?
from __future__ import print_function
import mlbgame
month = mlbgame.games(2015, 6, home="Mets")
games = mlbgame.combine_games(month)
for game in games:
print(game)
from mlbgame.
@zachpanz88 I don't have the error anymore, but I just used the exact examples that were shown in the readme, neither worked and both gave the same error.
from mlbgame.
@jimluke827 I noticed from your error messages that you are using Windows. I have been testing everything on Linux, which handles .gz files much better than Windows. The problem could have arisen from Windows not being able to handle the compressed files, so I'll run some tests on Windows.
from mlbgame.
Expanding on this, I also had the same issue. I believe it is related to the .gz compressed xml files in a windows environment. I was eventually able to remedy the issue by moving the archived gameday-data to a backup folder which forced the wrapper to make calls to the server instead of using the archived xml data.
I unfortunately don't have a better work around to offer at this time, other than moving the saved data.
from mlbgame.
@rhoffer21 I will try to find a better compression format for windows (probably zip). I will also build a delete function into the update module that will allow you to remove all downloaded data.
from mlbgame.
Released in 2.3.2.
from mlbgame.
Related Issues (20)
- Changing time zone to Pacific HOT 1
- overview(game_id) causes XMLSyntaxError HOT 2
- long return time waits? HOT 2
- Events run very slow HOT 1
- Pypi version (2.5) out of date HOT 1
- Standings pulls
- Can I get data such as if there are runners on first, second, or third, and how many balls and strikes there are? HOT 1
- game_id HOT 3
- Probable Pitchers HOT 3
- Game ID HOT 1
- Home/Away probables listed for wrong team
- mlbgame.injury() gives AttributeError HOT 4
- get_raw_box_score throws 'Could not find a game with that id.' exception for valid game_id
- Getting game events for game with unplayed bottom of final inning causes IndexError
- ValueError: Could not find a game with that id still occurring -- worked yesterday HOT 1
- 2022 Games not appearing HOT 9
- Initial setup to access MLB GD2 Database: HTTP Forbidden
- Not getting a response while running tests
- Import mlbgame could not be resolved HOT 1
- No Response HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlbgame.