Locked two players for basketball draftkings caption mode
See original GitHub issuefrom pydfs_lineup_optimizer import Site, Sport, get_optimizer
optimizer = get_optimizer(Site.DRAFTKINGS_CAPTAIN_MODE, Sport.BASKETBALL)
optimizer.load_players_from_csv("DKSalaries.csv")
player1 = optimizer.get_player_by_name("LeBron James")
player2 = optimizer.get_player_by_name("Tyler Herro")
optimizer.add_player_to_lineup(player1)
optimizer.add_player_to_lineup(player2)
lineup_generator = optimizer.optimize(3)
for lineup in lineup_generator:
print(lineup)
I tried with this code. If there are only one locked player, it is good. And with this code, I am getting below error. Please help me. Thank you.
Traceback (most recent call last): File ".\example.py", line 9, in <module> optimizer.add_player_to_lineup(player2) File "F:\source\018_django_lingups_optimizer\workspace\pydfs-lineup-optimizer-master\pydfs_lineup_optimizer\lineup_optimizer.py", line 224, in add_player_to_lineup raise LineupOptimizerException('You\'re already select all %s\'s' % '/'.join(player.positions)) pydfs_lineup_optimizer.exceptions.LineupOptimizerException: You're already select all CPT's PS F:\source\018_django_lingups_optimizer\workspace\pydfs-lineup-optimizer-master>
Issue Analytics
- State:
- Created 3 years ago
- Comments:27
Top Results From Across the Web
NBA Rules and Scoring for DraftKings Fantasy Sports
A locked player cannot be added or removed from a roster spot. Locked roster spots for all entries are displayed in contest GameCenters....
Read more >CBB Showdown Captain Mode - DraftKings
However, a player cannot be added at both Captain and Util in the same lineup. ... Locked roster spots for all entries are...
Read more >Rules & Scoring - DraftKings - Daily Fantasy Sports for Cash
NBA Showdown Captain Mode. In salary cap contests, participants will create a lineup by selecting players listed in the Player Pool. Each player...
Read more >CBB Rules and Scoring for DraftKings Fantasy Sports
A locked player cannot be added or removed from a roster spot. Locked roster spots for all entries are displayed in contest GameCenters....
Read more >NBA In-Game Showdown H2 - DraftKings
A locked player cannot be added or removed from a roster spot. Locked roster spots for all entries are displayed in contest GameCenters....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thats what i figured when i saw your error
Ok, thanks