AIrsenal icon indicating copy to clipboard operation
AIrsenal copied to clipboard

Run optimisation fails without FPL login credentials

Open eddableheath opened this issue 2 years ago • 1 comments

When running airsenal_run_optimization either post prediction, or as part of airsenal_run_pipeline the following is prompted:

Would you like to login to the FPL API? This is not necessary for most AIrsenal actions, but may improve accuracy of player sell values, and free transfers for your team, and will also enable AIrsenal to make transfers for you through the API. (y/n):

On giving n the following error is returned:

RuntimeError: Requested logging into the FPL API but no credentials provided.

With the following location reported as the source of the bug:

File "/opt/homebrew/Caskroom/miniconda/base/envs/airsenalenv/lib/python3.11/site-packages/airsenal/framework/data_fetcher.py", line 140

eddableheath avatar Aug 24 '23 09:08 eddableheath

It now works, however asks for the login details twice before running.

eddableheath avatar Aug 24 '23 09:08 eddableheath