meraki-analytics / cassiopeia

An all-inclusive Python framework for the Riot Games League of Legends API. Cass focuses on making the data easy and fun to work with, while providing all the tools necessary to create a website or do data analysis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

player stats: dragon_kills and baron_kills does not work

prodmarci opened this issue · comments

So i have this two values:
champion_dk = match.participants[summoner].stats.dragon_kills
champion_bk = match.participants[summoner].stats.baron_kills

When calling dragon kill stat you get an exception:
"...leagueAnalyzer/main.py", line 60, in analyzeLastMatches champion_dk = match.participants[summoner].stats.dragon_kills
"...cassiopeia\core\match.py", line 30, in wrapper return method(self, *args, **kwargs)
"...cassiopeia\core\match.py", line 1054, in dragon_kills return self._data[TeamData].dragonKills
KeyError: <class 'cassiopeia.core.match.TeamData'>

When calling baron kill stat you get an exception:
TypeError: unsupported operand type(s) for *: 'method' and 'int'

As docs say baron_kills should return int value, instead of method

Hope for a fix!

Noticed this too. You can fix this temporarily:
champion_dk = match.participants[summoner].stats.to_dict()['dragonKills']
champion_bk = match.participants[summoner].stats.to_dict()['baronKills']
Weird how that works, huh.