Comments (7)
What do you see when you run livestats.py -hello
?
from fflproject.
from fflproject.
Edit livestats.py, on line 510 (line before cur.execute(query)
), add print query
. Then run it and let me know what the output looks like.
from fflproject.
here is output for week 1
python livestats.py -week 1 -all -recalc_all
Udpating NFL Statistics (2017-09-22 12:23:48)
Reading NFL stats for Week 1
Got all games
--- 0.299476861954 seconds ---
KC (42) at NE (27) - Q: Final, 00:39
NYJ (12) at BUF (21) - Q: Final, 00:39
ATL (23) at CHI (17) - Q: Final, 00:03
BAL (20) at CIN (0) - Q: Final, 00:25
PIT (21) at CLE (18) - Q: Final, 00:36
ARI (23) at DET (35) - Q: Final, 00:18
JAX (29) at HOU (7) - Q: Final, 00:32
OAK (26) at TEN (16) - Q: Final, 00:07
PHI (30) at WAS (17) - Q: Final, 00:25
IND (9) at LA (46) - Q: Final, 00:00
SEA (9) at GB (17) - Q: Final, 00:39
CAR (23) at SF (3) - Q: Final, 00:25
NYG (3) at DAL (19) - Q: Final, 00:04
NO (19) at MIN (29) - Q: Final, 00:28
LAC (21) at DEN (24) - Q: Final, 00:01
Purged 0 nfl_statistic rows.
--- 5.74099588394 seconds ---
Calculating and storing fantasy values
****** 6596 fantasy_statistics to calculate
select scoring_def.nfl_scoring_cat_id, per, points, round, is_range, range_start, range_end, nfl_position_id from scoring_def join nfl_scoring_cat on nfl_scoring_cat.id = scoring_def.nfl_scoring_cat_id where league_id = 1 and year = 2017
select scoring_def.nfl_scoring_cat_id, per, points, round, is_range, range_start, range_end, nfl_position_id from scoring_def join nfl_scoring_cat on nfl_scoring_cat.id = scoring_def.nfl_scoring_cat_id where league_id = 2 and year = None
Traceback (most recent call last):
File "livestats.py", line 654, in
main()
File "livestats.py", line 46, in main
update_games(year, week, weektype, args.all)
File "livestats.py", line 76, in update_games
update_fantasy_statistics(year, week, weektype)
File "livestats.py", line 432, in update_fantasy_statistics
scoring_def = get_scoring_def_dict(leagueid, year)
File "livestats.py", line 511, in get_scoring_def_dict
cur.execute(query)
File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1054, "Unknown column 'None' in 'where clause'")
This is output when trying week 2:
python livestats.py -week 2 -all -recalc_all
Udpating NFL Statistics (2017-09-22 12:24:43)
Reading NFL stats for Week 2
Traceback (most recent call last):
File "livestats.py", line 654, in
main()
File "livestats.py", line 46, in main
update_games(year, week, weektype, args.all)
File "livestats.py", line 67, in update_games
(live_changes_made, livegamecount) = update_nfl_statistics(year, week, weektype, update_all)
File "livestats.py", line 109, in update_nfl_statistics
games = nflgame.games(int(year), week=int(week), kind=weektype)
File "/usr/lib/python2.7/site-packages/nflgame/init.py", line 229, in games
return list(games_gen(year, week, home, away, kind, started))
TypeError: 'NoneType' object is not iterable
from fflproject.
It looks like you have two leagues setup and one of them doesn't have any scoring definitions defined. The easiest way for you to get up and running would be to add at least one scoring definition for the league that doesn't have any.
Longer term, I'll fix the bug by updating livestats.py to skip any leagues without scoring definitions.
from fflproject.
from fflproject.
This has been fixed and committed to the develop branch.
from fflproject.
Related Issues (20)
- Live Draft watch list doesn't update right HOT 1
- Chat doesn't allow scrolling
- Free Agents not showing up during draft? HOT 2
- Watch list clear bug HOT 1
- Cant reset season / year HOT 9
- cannot get live draft working HOT 1
- player points show 0 when viewing "League -> Players" HOT 2
- no way for user to switch between leagues HOT 2
- Editing Starting Lineup from Admin Screen HOT 1
- Anyone missing Jacksonville players? HOT 2
- Quick Stat for kickers Heading issue HOT 2
- player database inaccuracies HOT 7
- No Issue, just curious...
- Remove Trades offers that can't be completed
- Division settings don't update at season advance
- Draft room player list formatting HOT 2
- Add player watch list to team roster page
- Manage NFL Player data in admin
- Install HOT 1
- Nflgame-redux is down 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 fflproject.