olimorris / pyscoutfm

:telescope: Use the power of Python to traverse the cosmos and scout for players within the Football Manager game
MIT License
17 stars 1 forks source link

Error when using player search #6

Closed mcbgun closed 6 months ago

mcbgun commented 6 months ago

Hi, Error.txt

Firstly well done...I can see the quality of work on show with this great program! For me the squad screen works perfectly, I got the html output as per your screenshots. However, when I try to run the same for the player search screen I get the following error output. I'm not sure if it's a me thing or a program thing? One other question I have is does the program aggregate the range values to a median value like squirrel's? Not sure whether the below is linked to players not fully scouted?

Thanks again!

olimorris commented 6 months ago

Thanks for raising the issue.

Could you paste the HTML file you're working with and then I can take a look? You should be able to to upload it here:

2023-12-28 11_04_35 - Safari@2x

One other question I have is does the program aggregate the range values to a median value like squirrel's

Good question. I really need to add a section explaining how the app works. Currently, the app evaluates the HTML file you've exported against the weightings which either you specify or the app's defaults. It works out, for every position, what the maximum possible score could be given the weightings. Then it works out what the individual player scored against the weightings and divides that over the maximum possible score. This enables us to have a percentage score.

I think the advantage of my approach is if you decide you want to adjust the weightings for a given position the score will always be out of 100%.

mcbgun commented 6 months ago

Thanks for raising the issue.

Could you paste the HTML file you're working with and then I can take a look? You should be able to to upload it here:

2023-12-28 11_04_35 - Safari@2x

One other question I have is does the program aggregate the range values to a median value like squirrel's

Good question. I really need to add a section explaining how the app works. Currently, the app evaluates the HTML file you've exported against the weightings which either you specify or the app's defaults. It works out, for every position, what the maximum possible score could be given the weightings. Then it works out what the individual player scored against the weightings and divides that over the maximum possible score. This enables us to have a percentage score.

I think the advantage of my approach is if you decide you want to adjust the weightings for a given position the score will always be out of 100%.

Hi thanks for such a quick response! It's not letting me add the html file unfortunately as it's not a supported file type. I've zipped it up for you though. Hopefully that works! Makes sense as well what you've said about the evaluation. :) test.zip

olimorris commented 6 months ago

Great thanks. Yep can confirm the issue is because Luismi Corrales has not been fully scouted and has attributes like 1-7. What I'll do is put a fix which picks the middle ground between those two attributes and flags that it's an estimate

mcbgun commented 6 months ago

Great stuff. Let me know when you've had chance to complete and I'll test.

olimorris commented 6 months ago

Right, I've just pushed a fix. If you run pip install --upgrade pyscoutfm in a few minutes it should install v1.1.0.

I ran it on your html file and it worked fine.

mcbgun commented 6 months ago

Yes confirmed...works perfectly thank you so much!