Closed brendon1555 closed 6 years ago
This should have been fixed before the most recent update of Cass. Can you update and see if you still have this issue?
This happens if the default region is set using set_default_region().
>>> import cassiopeia as cass
>>> import os
>>> cass.set_riot_api_key(os.environ["RIOT_API_KEY"])
>>> s = cass.get_summoner(name="xxcode", region='NA')
>>> ml = cass.get_match_history(summoner=s, begin_index=0, end_index=100, seasons=[cass.data.Season.from_id(11)])
Making call: https://na1.api.riotgames.com/lol/summoner/v3/summoners/by-name/xxcode
>>> cass.set_default_region("NA")
>>> ml = cass.get_match_history(summoner=s, begin_index=0, end_index=100, seasons=[cass.data.Season.from_id(11)])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/peterli/miniconda3/envs/timewinder/lib/python3.6/site-packages/cassiopeia/cassiopeia.py", line 75, in get_match_history
return MatchHistory(summoner=summoner, begin_index=begin_index, end_index=end_index, begin_time=begin_time, end_time=end_time, queues=queues, seasons=seasons, champions=champions)
File "/Users/peterli/miniconda3/envs/timewinder/lib/python3.6/site-packages/cassiopeia/core/common.py", line 44, in default_region_wrapper
return method(self, *args, **kwargs)
File "/Users/peterli/miniconda3/envs/timewinder/lib/python3.6/site-packages/cassiopeia/core/common.py", line 201, in __call__
query = cls.__get_query_from_kwargs__(**kwargs)
File "/Users/peterli/miniconda3/envs/timewinder/lib/python3.6/site-packages/cassiopeia/core/common.py", line 44, in default_region_wrapper
return method(self, *args, **kwargs)
TypeError: __get_query_from_kwargs__() got an unexpected keyword argument 'region'
>>>
Get the following
TypeError
when fetching match history