Comments (6)
I'm getting the same, Richard. I am trying to seed my NFL database in time for the season start. Sportsipy is an awesome API, and I would love to get this fixed soon.
from sportsipy.nfl.boxscore import Boxscore
game_data = Boxscore("202012070sfo")
print(game_data)
// lxml.etree.XMLSyntaxError: line 3608: b'Tag use invalid'
from sportsipy.
Hey @westaa -> I received a fix in a separate issue:
First clone the repo to your local machine and then apply the fix below in the local repo and it should work. I had to pip uninstall the package for it to work correctly.
CodeeMcCoderson commented 10 days ago
@RichardSJTotten to fix the problem that I had, which seems almost identical to yours, is I changed the sportsipy module directly on my hard drive. I did not pull down the fix that I posted earlier.
If you navigate to where you have your modules stored on your local machine, find the 'sportsipy' module and got into it. Then go into the 'nfl' module and click on the 'constants.py' scripts.
Within that script navigate to line 81 and change this line of code:
'home_name': 'a[itemprop="name"]:first',
To this:
'home_name': 'div[class="linescore_wrap"] table tbody tr:last td:nth-child(2)',
Next go to line 84 and change this line of code:
'away_name': 'a[itemprop="name"]:last',
To this:
'away_name': 'div[class="linescore_wrap"] table tbody tr:first td:nth-child(2)',
After changing it, save the script, navigate to your script that was throwing the error and run it again.
It should work.
Let me know if anything was not clear or if it does not work, I will try and help more.
from sportsipy.
Sorry for the late reply. Thank you so much for posting this, @RichardSJTotten. I will try this today.
from sportsipy.
The above fix initially worked, but now I'm getting a similar issue:
lxml.etree.XMLSyntaxError: line 1636: b'Tag use invalid'
from sportsipy.
The fix appears to work for all seasons prior to the current 2022 season.
from sportsipy.
The fix appears to work for all seasons prior to the current 2022 season.
I'm finding the same to be true. I've applied the fix, uninstalled and reinstalled, etc. Any ideas? Thanks!
from sportsipy.
Related Issues (20)
- NFL Boxscore initialization failing HOT 2
- NFL Boxscore: Document is Empty HOT 12
- NHL: Full Score Not Shown When Game Goes Into Overtime or Shootout
- NCAAB height returns None obeject
- HTTPError
- HTTPError: HTTP Error 429: Too Many Requests HOT 21
- NCAAB Boxscore losing_abbr, losing_name, winning_abbr, winning_name not populating HOT 3
- Game (goals_against) data returning "None"
- Add NFL scoring information to Boxscore HOT 1
- NHL Boxscore error
- NFL teams proper abbreviations are not all properly working to pull data HOT 2
- NHL Boxscore returning previous days data HOT 2
- Teams data not found for all sports HOT 2
- NCAAB Boxscore and Boxscores returning blank for valid inputs HOT 2
- Script running but no data returned HOT 7
- Cannot get past first example of tutorial
- Did sports reference completely change their site? HOT 10
- join() got an unexpected keyword argument 'closing_combiner' error HOT 1
- Active Branch with specified requirements installed not returning expected results. 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 sportsipy.