Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aioredis.errors.ReplyError: ERR ERROR #108

Open
lsly2970 opened this issue May 1, 2023 · 1 comment
Open

aioredis.errors.ReplyError: ERR ERROR #108

lsly2970 opened this issue May 1, 2023 · 1 comment

Comments

@lsly2970
Copy link

lsly2970 commented May 1, 2023

image

image
image
when I run this code in a FastApi app, I got error below:

Traceback (most recent call last):
  File "/usr/local/python3.9/lib/python3.9/site-packages/aioredlock/redis.py", line 198, in set_lock
    await redis.evalsha(
aioredis.errors.ReplyError: ERR ERROR

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/python3.9/lib/python3.9/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/usr/local/python3.9/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/python3.9/lib/python3.9/site-packages/fastapi/applications.py", line 276, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/python3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/usr/local/python3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/usr/local/python3.9/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/usr/local/python3.9/lib/python3.9/site-packages/fastapi/routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/python3.9/lib/python3.9/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
    return await dependant.call(**values)
  File "/home/martin/main.py", line 765, in sale
    lock = await lock_manager.lock(key, lock_timeout=10,
  File "/usr/local/python3.9/lib/python3.9/site-packages/aioredlock/algorithm.py", line 142, in lock
    await self._set_lock(resource, lock_identifier, lease_time)
  File "/usr/local/python3.9/lib/python3.9/site-packages/aioredlock/algorithm.py", line 92, in _set_lock
    raise error
  File "/usr/local/python3.9/lib/python3.9/site-packages/aioredlock/algorithm.py", line 77, in _set_lock
    elapsed_time = await self.redis.set_lock(resource, lock_identifier, lease_time)
  File "/usr/local/python3.9/lib/python3.9/site-packages/aioredlock/redis.py", line 355, in set_lock
    raise_error(successes, 'Can not acquire the lock "%s"' % resource)
  File "/usr/local/python3.9/lib/python3.9/site-packages/aioredlock/redis.py", line 26, in raise_error
    raise [e for e in errors if type(e) is LockAcquiringError][0]
  File "/usr/local/python3.9/lib/python3.9/site-packages/aioredlock/redis.py", line 208, in set_lock
    raise LockAcquiringError('Can not set lock') from exc
aioredlock.errors.LockAcquiringError: Can not set lock
@gaxeliy
Copy link

gaxeliy commented Jun 9, 2023

Same proplem! Any ideas for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants