sertalpbilal / FPL-Optimization-Tools

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

Error when solving for preseason + noise #10

Closed prmac closed 2 years ago

prmac commented 2 years ago

Following regular_settings.json throws an error.

Traceback (most recent call last):
  File "solve_regular.py", line 29, in <module>
    result = solve_multi_period_fpl(data, options)
  File "/fpl-optimization/run/../src/multi_period_dev.py", line 428, in solve_multi_period_fpl
    var.set_value(float(words[2]))
AttributeError: 'NoneType' object has no attribute 'set_value'
{
    "horizon": 5,
    "ft_value": 1.5,
    "itb_value": 0.08,
    "no_future_transfer": false,
    "randomized": true,
    "xmin_lb": 2,
    "banned": [],
    "locked": [],
    "delete_tmp": true,
    "secs": 300,
    "use_cmd": true,
    "num_transfers": 0,
    "hit_limit": null,
    "use_wc": null,
    "use_bb": null,
    "use_fh": null,
    "chip_limits": {"bb": 0, "wc": 0, "fh": 0, "tc": 0},
    "future_transfer_limit": null,
    "no_transfer_gws": [],
    "booked_transfers": [],
    "preseason": true,
    "use_login": false,
    "cbc_path": ""
}
prmac commented 2 years ago

Actually, it's setting preseason to true that throws the error

prmac commented 2 years ago

Malformed json file was the problem.