mushorg / tanner

He who flays the hide
GNU General Public License v3.0
220 stars 101 forks source link

TypeError: zrevrangebyscore() got an unexpected keyword argument 'offset' #416

Open NitescuLucian opened 2 years ago

NitescuLucian commented 2 years ago

https://github.com/mushorg/tanner/blob/a98b7ab6f32a14f8301bdafc6c8fc9ecc1806e28/tanner/api/api.py#L42

tanner_web      | Error handling request
tanner_web      | Traceback (most recent call last):
tanner_web      |   File "/opt/tanner/tanner-env/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
tanner_web      |     resp = await request_handler(request)
tanner_web      |   File "/opt/tanner/tanner-env/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
tanner_web      |     resp = await handler(request)
tanner_web      |   File "/opt/tanner/tanner-env/lib/python3.9/site-packages/aiohttp_jinja2/__init__.py", line 91, in wrapped
tanner_web      |     context = await coro(*args)
tanner_web      |   File "/opt/tanner/tanner-env/lib/python3.9/site-packages/Tanner-0.6.0-py3.9.egg/tanner/web/server.py", line 39, in handle_snare_stats
tanner_web      |     snare_stats = await self.api.return_snare_stats(snare_uuid)
tanner_web      |   File "/opt/tanner/tanner-env/lib/python3.9/site-packages/Tanner-0.6.0-py3.9.egg/tanner/api/api.py", line 26, in return_snare_stats
tanner_web      |     sessions = await self.return_snare_info(snare_uuid)
tanner_web      |   File "/opt/tanner/tanner-env/lib/python3.9/site-packages/Tanner-0.6.0-py3.9.egg/tanner/api/api.py", line 42, in return_snare_info
tanner_web      |     query_res = await self.redis_client.zrevrangebyscore(uuid, offset=0, count=count)
tanner_web      | TypeError: zrevrangebyscore() got an unexpected keyword argument 'offset'

I think was added as fix to another bug but I am running with dockers...

NitescuLucian commented 2 years ago

https://aioredis.readthedocs.io/en/latest/api/high-level/#aioredis.client.Redis.zrevrangebyscore

afeena commented 2 years ago

Hey, I believe you are running the master branch. Could you try please with the develop? It should be fixed there