question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Locked two players for basketball draftkings caption mode

See original GitHub issue
from 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:closed
  • Created 3 years ago
  • Comments:27

github_iconTop GitHub Comments

1reaction
Denwen12commented, Oct 9, 2020

thats what i figured when i saw your error

1reaction
dev0926commented, Oct 9, 2020

Ok, thanks

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found