cassiopeia
cassiopeia copied to clipboard
Timeline IDs are passed as int instead of ['platform_'+str(match_id)]
For example, the match id of "4084765297" is passed when calling matcg.timeline.first_tower_fallen instead of "NA1_4084765297"
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\merakicommons\cache.py", line 15, in wrapper return getattr(self, s)
AttributeError: 'Match' object has no attribute '_lazy__timeline'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\KARLRO~1\AppData\Local\Temp/ipykernel_12788/2130516140.py", line 1, in
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\debugpy_vendored\pydevd_pydev_bundle\pydev_umd.py", line 167, in runfile execfile(filename, namespace)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\debugpy_vendored\pydevd_pydev_imps_pydev_execfile.py", line 25, in execfile exec(compile(contents + "\n", file, 'exec'), glob, loc)
File "C:/Users/Karl Roush/Desktop/Riot dev work/lol_genius_tool/example_fetchData.py", line 55, in
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\merakicommons\cache.py", line 17, in wrapper value = method(self)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\cassiopeia\core\match.py", line 1675, in timeline self._timeline = Timeline(id=self.id, continent=self.continent)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\cassiopeia\core\common.py", line 180, in call return pipeline.get(cls, query=query)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\pipelines.py", line 459, in get return handler.get(query, context)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\pipelines.py", line 185, in get result = self._source.get(self._source_type, deepcopy(query), context)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\sources.py", line 69, in wrapper return call(self, query, context=context)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\queries.py", line 325, in wrapped validator(query)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\queries.py", line 209, in call return self._root.evaluate(query, context)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\queries.py", line 60, in evaluate child.evaluate(query, context)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\queries.py", line 198, in evaluate self.child.evaluate(query, context)
File "C:\Users\Karl Roush.conda\envs\riot_dev\lib\site-packages\datapipelines\queries.py", line 173, in evaluate raise WrongValueTypeError("{key} must be of type {type} in query! Got {badtype}.".format(key=self.key, type=self, badtype=type(value)))
WrongValueTypeError: id must be of type str in query! Got 4084765297.
I'm not sure how to correct this, but it should be as simple as concatenating the platform value to the match ID
I believe I might have been having the same issue.
I had to edit https://github.com/meraki-analytics/cassiopeia/blob/54aec979b575e085c3bc244b938ef71b71697781/cassiopeia/core/match.py#L1673
@lazy_property
def timeline(self) -> Timeline:
if self._timeline is None:
self._timeline = Timeline(id=self.id, continent=self.continent)
return self._timeline
to this
@lazy_property
def timeline(self) -> Timeline:
if self._timeline is None:
self._timeline = Timeline(id=f"{self.region.platform.value}_{self.id}", continent=self.continent)
return self._timeline
And it solved the timeline issues for me.
I believe I might have been having the same issue.
I had to edit
https://github.com/meraki-analytics/cassiopeia/blob/54aec979b575e085c3bc244b938ef71b71697781/cassiopeia/core/match.py#L1673
@lazy_property def timeline(self) -> Timeline: if self._timeline is None: self._timeline = Timeline(id=self.id, continent=self.continent) return self._timelineto this
@lazy_property def timeline(self) -> Timeline: if self._timeline is None: self._timeline = Timeline(id=f"{self.region.platform.value}_{self.id}", continent=self.continent) return self._timelineAnd it solved the timeline issues for me.
Works for me! Thank you!
Thanks - this is fixed now. See #427