VRichardJP / LoLAnalyzer

Using machine learning to find the best pick in a draft (League of Legends)
MIT License
44 stars 5 forks source link

API EXPIRED #6

Closed Laende closed 6 years ago

Laende commented 6 years ago

Hi! Ran the configupdater successfully, but getting the error mentioned in title even with a newly generated API key, also it ends with the same problem as the issue mentioned in #2. I've updated RunAll.py to:

m = Modes.ABR_TJMCS_Mode(['8.10', '8.11'])

I've also tried deleting the extracted folder and file.

Other suggestions to try?

1 2

VRichardJP commented 6 years ago

I guess the API from Riot may have changed a bit. I'll check this out.

Laende commented 6 years ago

Status? :)

VRichardJP commented 6 years ago

Soon™ Sorry I'm very busy atm, I'll try to check this weekend maybe ^^

VRichardJP commented 6 years ago

As I guessed, Riot's API has changed a little bit. Normally, requesting a page that does not exist should return a 404 error, but it seems they have simply restricted the access to the old API, hence the "API-KEY has EXPIRED" error msg. I pushed a fix. I was able to download games from kr server dia league with this. Tell me if you have another issue.

PS: set DEBUG to False in InterfaceAPI.py if you don't want to be flooded by all the msg

Laende commented 6 years ago

These errors occasionally appear. Any idea?

skjermbilde

EDIT: Seems to be a windows bug.

Also, I'd like to train with GPUs. Is it as simple as to just install tensorflow-gpu? No need to add any imports / edit few lines of code?

Thanks for the help so far!

VRichardJP commented 6 years ago

This is a strange bug indeed, caused by a recent Windows 10 update <3 (https://bugs.python.org/issue32245) If this is the only print to be concerned, you can either comment it or do something like this:

try:
    print(...)
except OSError as e:
    pass

If this is not the only one, well you can do something like this:

As for the GPU part, you only need to install tensorflow-gpu. Tensorflow will tell you which hardware has been detected once you're at the training part. If you have already installed tensorflow, remove it first to make sure you will only have gpu version:

pip3 uninstall tensorflow
pip3 install tensorflow-gpu
Laende commented 6 years ago

After getting the players this happens:

skjermbilde1 skjermbilde2

VRichardJP commented 6 years ago

A fix has been pushed

Once again something new from the API: Riot does not save player's role/lane from the roles you are assigned in the lobby because of the possible role/lane swap. Instead, they have a secret algorithm which goal is to deduce what role/lane each player had by looking at some in-game stats (for example, the player average (x,y) position in the first 10 minutes). Until now, this algorithm has always tagged players as either 'TOP', 'JUNGLE', 'MIDDLE' or 'BOTTOM'. But apparently, a new lane has appeared recently in the rift named 'NONE' :)