BenBrostoff / draftfast

A tool to automate and optimize DraftKings and FanDuel lineup construction.
287 stars 113 forks source link

MissingPlayersException #57

Closed rmeyer1 closed 6 years ago

rmeyer1 commented 6 years ago

Hello -

I downloaded a Salaries.csv off DraftKings, and ran the bash script (sudo bash scripts/prepare_nba_contest_data.sh) which appeared to work fine.

However, when I ran the optimizer script(sudo python optimize.py -league NBA -source nba_rotogrinders) I received the following error:

Traceback (most recent call last): File "optimize.py", line 338, in rosters.append(run(args.league, remove, args)) File "optimize.py", line 83, in run _check_missing_players(all_players, args.sp, args.mp) File "optimize.py", line 266, in _check_missing_players 'Total missing players at price point: ' + str(miss_len)) dke_exceptions.MissingPlayersException: Total missing players at price point: 112

Any suggestions are much appreciated.

Thanks!

BenBrostoff commented 6 years ago

Hey @rmeyer1 - this will happen if Rotogrinders upgrades their projections to the next day if you're using the DKSalaries.csv from DraftKings for the current day. You can check out the unit tests in test/test_command_line.py as reference for what CSV formats are expected.

I also just ran python optimize.py -league NBA -source nba_rotogrinders for today without issue; here are the CSVs on Google Drive.

Let me know if you're still having issues here; otherwise I'll close this one.

rmeyer1 commented 6 years ago

Hey Ben -

Thanks for getting back to me! That makes sense as I was also able to run it successfully this morning. I will use the unit tests next time before opening an issue. I have really enjoyed your optimizer, it has been very fun to play with over the last couple of days.

One other question I did have, in reading through the optimize.py --help I was looking for a way to exclude specific individuals from lineups. This seems possible for NFL but it is it possible to do it for NBA? an example scenario would be excluding Chris Paul from all optimized lineups? I may be doing something wrong on the command line but any input should help. Please let me know.

Thanks! Rob

On Tue, Nov 14, 2017 at 8:34 AM, Ben Brostoff notifications@github.com wrote:

Hey @rmeyer1 https://github.com/rmeyer1 - this will happen if Rotogrinders upgrades their projections to the next day if you're using the DKSalaries.csv from DraftKings for the current day. You can check out the unit tests in test/test_command_line.py as reference for what CSV formats are expected.

I also just ran python optimize.py -league NBA -source nba_rotogrinders for today without issue; here are the CSVs on Google Drive https://docs.google.com/spreadsheets/d/10dFUwg0IhS-pF6Fze5OF_M-3vVtCehMjr5vRVrUVG70/edit?usp=sharing .

Let me know if you're still having issues here; otherwise I'll close this one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BenBrostoff/draft-kings-fun/issues/57#issuecomment-344260190, or mute the thread https://github.com/notifications/unsubscribe-auth/AcwgXrH5Fc7_8t3yfFWTHTDBeeoldz4fks5s2ZbfgaJpZM4QcaXW .

BenBrostoff commented 6 years ago

@rmeyer1 I'll looking into this; very possible NBA does not work with banning.

BenBrostoff commented 6 years ago

@rmeyer1 I'm not seeing this issue. Please see the screenshot below - I've eliminated Kevin Durant from tonight's lineup, who is in the optimial lineup without the banned flag.

screen shot 2017-11-16 at 9 07 42 am

Going to close this issue since I want to avoid this becoming a catch-all for everything project related. I have a Slack channel if you want to talk lineups or how to use the tool - definitely stop by! If there is a bug in this repo or you have a feature request, definitely post a GitHub issue.

rmeyer1 commented 6 years ago

Hey Ben -

Could you send me an invite to the Slack channel?

Regards, Rob

On Thu, Nov 16, 2017 at 9:11 AM, Ben Brostoff notifications@github.com wrote:

@rmeyer1 https://github.com/rmeyer1 I'm not seeing this issue. Please see the screenshot below - I've eliminated Kevin Durant from tonight's lineup, who is in the optimial lineup without the banned flag.

[image: screen shot 2017-11-16 at 9 07 42 am] https://user-images.githubusercontent.com/6991348/32895416-ff491b12-caad-11e7-875d-42fd3a9a2b42.png

Going to close this issue since I want to avoid this becoming a catch-all for everything project related. I have a Slack channel if you want to talk lineups or how to use the tool https://draftfast.slack.com - definitely stop by! If there is a bug in this repo or you have a feature request, definitely post a GitHub issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BenBrostoff/draft-kings-fun/issues/57#issuecomment-344933794, or mute the thread https://github.com/notifications/unsubscribe-auth/AcwgXv_-HH3xBzGmOQ2ty2V2jjAMPsIKks5s3EKhgaJpZM4QcaXW .