DimaKudosh / pydfs-lineup-optimizer

Daily Fantasy Sports lineup optimzer for all popular daily fantasy sports sites
MIT License
424 stars 157 forks source link

Can't lock player in UTIL Position NBA DraftKings #407

Open MindingTheData opened 1 year ago

MindingTheData commented 1 year ago

I'm looking to lock certain players in the UTIL position on a DraftKings NBA contest.

Here's an example of what this might look like:

optimizer.player_pool.lock_player('Karl-Anthony Towns', 'UTIL')

However, I'm getting the following error: LineupOptimizerException: Position UTIL doesn't exist. Available positions are C,PG,SG,SF,PF

Is there any way I'm able to specifically lock a player into the UTIL position?

Milkman9691 commented 1 year ago

By using this is may work personally I have never tried this but it is a possibility

P1 = optimizer.player_pool.get_player_by_name('Karl-Anthony Towns', for_positions['UTIL'])