Code Monkey home page Code Monkey logo

Comments (6)

westaa avatar westaa commented on July 1, 2024

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.

RichardSJTotten avatar RichardSJTotten commented on July 1, 2024

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.

westaa avatar westaa commented on July 1, 2024

Sorry for the late reply. Thank you so much for posting this, @RichardSJTotten. I will try this today.

from sportsipy.

reaganking avatar reaganking commented on July 1, 2024

The above fix initially worked, but now I'm getting a similar issue:

lxml.etree.XMLSyntaxError: line 1636: b'Tag use invalid'

from sportsipy.

ericmk52 avatar ericmk52 commented on July 1, 2024

@RichardSJTotten

The fix appears to work for all seasons prior to the current 2022 season.

from sportsipy.

kaulfuss avatar kaulfuss commented on July 1, 2024

@RichardSJTotten

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.