sertalpbilal / FPL-Optimization-Tools

A collection of tutorials and recipes to use optimization for winning Fantasy Premier League :)
Apache License 2.0
129 stars 45 forks source link

issue with locked_next_gw #27

Closed karljayb closed 2 months ago

karljayb commented 2 months ago

I think since the latest commit that locked_next_gw is broken?

For example, try to lock Haaland 351 and you get the following error from line 217 in multi_period_dev.py: Traceback (most recent call last): multi_period_dev.py", line 217, in prep_data locked_next_gw = [int(i[0]) for i in options.get('locked_next_gw', [])] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                      ~^^^

TypeError: 'int' object is not subscriptable

karljayb commented 2 months ago

I am closing this as it has come to my attention that the syntax should be locked_next_gw": [[351, 1]] ['player_id','gw']. This works.

sertalpbilal commented 2 months ago

I will unify the parameter, and fix the syntax in Readme file.