Closed 0dminnimda closed 4 years ago
it is logical to add that the problem is solved by "pip install brawlstats == 4.0.0"
Edit your initial comment and remove your token because that can be abused, never post your token publicly. Also, this should be fixed in v4.0.2
Thank you for your concern, I do not think that in this case it was dangerous, I thought twice to publish a token. (in any case, I wrote an already unused token)
in addition, if someone wants to use my token, he will not be able (in this case), because my token has in the white sheet only my ip
and wow, how quickly this is fixed :) version 4.0.2 is already on the network
Describe the bug version 4.0.1 made a mistake in the code.
Full Code `import brawlstats as bs
TOKEN = "some token"
my_tag = "2q0ql2pl".upper()
client = bs.Client(TOKEN)
me = client.get_player(my_tag)
print(me.raw_data['tag'])`
Expected behavior output "#2Q0QL2PL"
Actual behavior Traceback (most recent call last): File "test.py", line 9, in
me = client.get_player(my_tag)
File "C:\Program Files\Python38\lib\site-packages\brawlstats/utils.py", line 101, in wrapper
return func(*new_args, **new_kwargs)
File "C:\Program Files\Python38\lib\site-packages\brawlstats/core.py", line 205, in get_player
return self._get_model(url, model=Player)
File "C:\Program Files\Python38\lib\site-packages\brawlstatss/core.py", line 189, in _get_model
return model(self, data)
TypeError: init() takes 1 positional argument but 3 were given
Additional context Python Version: 3.8.2 brawlstats Version: 4.0.1 OS (and version): it doesn't matter since it doesn’t work both on my hosting and on my computer (after upgrading from 4.0.0 to 4.0.1)