cassiopeia icon indicating copy to clipboard operation
cassiopeia copied to clipboard

SimpleKVDiskStore causes match.load() to throw an exception

Open PeteyPii opened this issue 3 years ago • 1 comments

First I get the match history for a summoner. Then on the first match I get an exception when I call match.load():

Traceback (most recent call last):
  File "C:\Users\Patrick\code\LeagueStats\lol.py", line 28, in <module>
    main(sys.argv)
  File "C:\Users\Patrick\code\LeagueStats\lol.py", line 24, in main
    command.run(argv[2:])
  File "C:\Users\Patrick\code\LeagueStats\lol\command.py", line 93, in run
    self._run_impl(argv)
  File "C:\Users\Patrick\code\LeagueStats\lol\commands\update_matches.py", line 43, in _run_impl
    match_data = match.load().to_dict()
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\cassiopeia\core\common.py", line 226, in load
    self.__load__()
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\cassiopeia\core\common.py", line 239, in __load__
    self.__load__(group)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\cassiopeia\core\common.py", line 246, in __load__
    data = configuration.settings.pipeline.get(type=self._load_types[load_group], query=query)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\pipelines.py", line 459, in get
    return handler.get(query, context)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\pipelines.py", line 185, in get
    result = self._source.get(self._source_type, deepcopy(query), context)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\sources.py", line 120, in get
    return source.get(type, deepcopy(query), context)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\sources.py", line 69, in wrapper
    return call(self, query, context=context)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\queries.py", line 325, in wrapped
    validator(query)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\queries.py", line 209, in __call__
    return self._root.evaluate(query, context)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\queries.py", line 60, in evaluate
    child.evaluate(query, context)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\site-packages\datapipelines\queries.py", line 198, in evaluate
    self.child.evaluate(query, context)
  File "C:\Users\Patrick\AppData\Roaming\Python\Python39\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)))
ValueError: invalid literal for int() with base 10: 'NA1_4055198406'

When I remove

    "SimpleKVDiskStore": {
      "package": "cassiopeia_diskstore",
      "path": "D:/Data/lol_cache"
    },

from my settings. the call succeeds. I tried clearing my lol cache folder with no success.

PeteyPii avatar Sep 29 '21 07:09 PeteyPii

The SimpleKVDiskStore hasn't been updated to support the new match-v5 endpoints. I won't have time to do that anytime soon, but if you would like to create a PR for that library we will review it and hopefully merge it!

jjmaldonis avatar Sep 29 '21 16:09 jjmaldonis

@jjmaldonis Do you anticipate being able to fit this in in the near future (within a few months)?

zbee avatar Oct 03 '23 06:10 zbee

@zbee thanks for the PR to fix it!

jjmaldonis avatar Oct 13 '23 01:10 jjmaldonis