Comments (4)
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.
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.
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.
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)
- Any active users here? HOT 36
- nfldb-update: command not found HOT 4
- New Season HOT 2
- pip freeze
- Has the NFL ever complained about this project? HOT 2
- pip error
- Game gsis_id = 2017111911 missing in schedule.json (Ochawkeye issue #298)
- Not able to install in Windows HOT 2
- pip installation error HOT 1
- ConfigParser with-update HOT 1
- Bulk Upload 2017-2019 nfldb-update HOT 4
- Installed and ran nfldb-update. Data Missing for 2017 and 2018 HOT 2
- Expected Points & Win Probability HOT 1
- KeyError Gsis_id = 2019122202
- NFL Update HOT 1
- Anyone have a .sql export with 2019? HOT 1
- XML feeds removed from NFL website? HOT 4
- NFL db update on Anaconda help HOT 1
- Odoo v14 error HOT 2
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 nfldb.