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
cass.set_riot_api_key(RiotEnv.API_KEY)
self.account = cass.get_account(name=account_name, tagline=account_tagline, region=region.value)
self.summoner = self.account.summoner
self.match = self.summoner.current_match
participants = self.match.participants
self.player = [p for p in participants if p.summoner == self.summoner][0]
self.stats = cass.core.match.ParticipantStats(match=self.match, participant=self.player)
Reading the library code and the online documentation, I understood that it is possible to use the instance of ParticipantStats to obtain the live values for the kda, champion level, etc.
The first time I call self.stats.kills I get the following error:
Traceback (most recent call last):
File "[redacted_1]\cassiopeia\core\match.py", line 56, in wrapper
return method(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[redacted_1]\cassiopeia\core\match.py", line 1217, in kills
return self._data[ParticipantStatsData].kills
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ParticipantStatsData' object has no attribute 'kills'
During handling of the above exception, another exception occurred:
...
File "[redacted_2]", line 22, in [redacted_3]
reward = self.stats.kills * 100
^^^^^^^^^^^^^^^^
File "[redacted_1]\cassiopeia\core\match.py", line 59, in wrapper
match = getattr(self, "_{}__match".format(self.__class__.__name__))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ParticipantStats' object has no attribute '_ParticipantStats__match'
I think I am missing some data in the ParicipantStats constructor or that I should obtain that value using other objects as I did for the match participants.
Following the documentation I can't find a path from the account to the live game participant stats.
The text was updated successfully, but these errors were encountered:
As part of a class, I have the following code:
Reading the library code and the online documentation, I understood that it is possible to use the instance of
ParticipantStats
to obtain the live values for the kda, champion level, etc.The first time I call
self.stats.kills
I get the following error:I think I am missing some data in the
ParicipantStats
constructor or that I should obtain that value using other objects as I did for the match participants.Following the documentation I can't find a path from the account to the live game participant stats.
The text was updated successfully, but these errors were encountered: