You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing lookup_cache as keyword arg that uses kwargs.get(), which means when kwargs contains {'lookup_cache':..} the lookup_cache keyword argument is passed, but then kwargs still contains lookup_cache, hence it gets passed via **kwargs also, resulting in a TypeError due to the same argument being passed twice, the solution to this would be using kwargs.pop() instead.
CTRL+F reveals 42 other instances of kwargs.get("lookup_cache", which do seem to be following the same pattern of passing the kwarg twice, hence I suspect a lot of other methods are also broken due to this.
I have not been following the development of coc.py and hence am not aware where else in the codebase this has been applied, I would be happy to fix this myself, if someone can confirm this is the only file where this has been implemented or there are other places as well.
The text was updated successfully, but these errors were encountered:
In the newest version of coc.py==3.8.0, the async client.get_players() method returns an error,
Script to reproduce the problem:
This error occurs because of line 2482 in client.py
Passing lookup_cache as keyword arg that uses kwargs.get(), which means when kwargs contains {'lookup_cache':..} the lookup_cache keyword argument is passed, but then kwargs still contains lookup_cache, hence it gets passed via **kwargs also, resulting in a TypeError due to the same argument being passed twice, the solution to this would be using kwargs.pop() instead.
CTRL+F reveals 42 other instances of kwargs.get("lookup_cache", which do seem to be following the same pattern of passing the kwarg twice, hence I suspect a lot of other methods are also broken due to this.
I have not been following the development of coc.py and hence am not aware where else in the codebase this has been applied, I would be happy to fix this myself, if someone can confirm this is the only file where this has been implemented or there are other places as well.
The text was updated successfully, but these errors were encountered: