Open walkertyler7713 opened 4 years ago
Dont forget to import the functions
from pydfs_lineup_optimizer.stacks import TeamStack, PositionsStack, PlayersGroup
from pydfs_lineup_optimizer import AfterEachExposureStrategy
This issue can be closed
Anyone wanna tell a noob why this is kickin a "ValueError: max() arg is an empty sequence" now?
Hello All,
First want to say what a great tool you've created, very much appreciate you sharing your work on this
Tool works great outside of the team stack options. I'm sure there is something I'm doing wrong but I cant figure it out from the docs. Can you take a look and advise?
optimizer = get_optimizer(Site.DRAFTKINGS, Sport.BASEBALL) optimizer.load_players_from_csv('Actual Batter.csv') optimizer.restrict_positions_for_opposing_team(['P'], ['C', 'SS', 'OF', '1B', '2B', '3B']) optimizer.set_max_repeating_players(5) optimizer.set_spacing_for_positions(['1B', '2B', '3B', 'OF', 'SS', 'C'], 3) optimizer.add_stack(TeamStack(3)) optimizer.add_stack(TeamStack(3, for_teams=['SD', 'NYY', 'CHC'])) for lineup in optimizer.optimize(n=100, randomness=True, max_exposure=.99, exposure_strategy=AfterEachExposureStrategy): print(lineup) print(lineup.players) # list of players print(lineup.fantasy_points_projection) print(lineup.salary_costs)
NameError Traceback (most recent call last)