GithubHelp home page GithubHelp logo

Comments (4)

ochawkeye avatar ochawkeye commented on July 20, 2024 1

I notice this on occasion.

What I do is delete the game from the database with something like this:

import nfldb
db = nfldb.connect()

q = nfldb.Query(db)
# q.game(season_year=2019, season_type='Regular', week=1)
#  gsis_ids = [game.gsis_id for game in q.as_games()]
gsis_ids = ['2019090808']

for gsis_id in gsis_ids:
    query = "DELETE FROM game where gsis_id = '{}';".format(gsis_id)
    with nfldb.Tx(db) as cursor:
        cursor.execute(query)  

Then locate and delete the game from your ..\Lib\site-packages\nflgame\gamecenter-json.

I actually do this for all games the morning after games have been played since there have been so many occasions where play-by-play has mistakes at time of the game ending (usually for plays where reviewed occurred?) but once the games end nflgame no longer goes back to check for updates.

from nfldb.

brbeaird avatar brbeaird commented on July 20, 2024

Yep, I had this same scenario for the IND/LAC game. Clearing out the JSON files and DB tables and doing a fresh update fixes it. I'll probably just write a script to do it like @ochawkeye mentioned.

On a related note, are you guys using the Python3 version of nflgame with nfldb? I see where it's supposed to be a "drop in replacement" for the Python2 version, but I'm not sure how that would work as far as pointing nfldb to the right version. I've not gotten deep enough into Python to know if nfldb would need to have its dependencies updated somehow...wouldn't pip install just fall back to the Python2.7 version otherwise?

from nfldb.

JoshADHD avatar JoshADHD commented on July 20, 2024

That little script did the trick. Thanks, @ochawkeye!

I've stuck with the 2.7 version of nflgame-redux for the time being. It's not broken (for the most part) so I see no reason to move at this time.

from nfldb.

ochawkeye avatar ochawkeye commented on July 20, 2024

On a related note, are you guys using the Python3 version of nflgame with nfldb? I see where it's supposed to be a "drop in replacement" for the Python2 version

I'm not and at this point probably won't until I absolutely have to. Most of my scripts were written in the infancy of my Python programming experience and are entirely too ugly for me to try to step through now.

When the day comes that I move to Python 3, I'll have to rewrite those 6 year old scripts from the ground up.

It's just easier for me to maintain the house of cards that rebuild from scratch for now.

from nfldb.

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.