redis-py: redis.exceptions.ResponseError: wrong number of arguments for 'subscribe' command

hi I had ubuntu 16.0.4 but when I see logs in my gunicorn

I’m getting this

Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]: Process Process-1:119:
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]: Traceback (most recent call last):
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     self.run()
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     self._target(*self._args, **self._kwargs)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/validator/views.py", line 1372, in ch
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     for r in res1.collect():
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/celery/result.py", line 289, in collect
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     yield R, R.get(**kwargs)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/celery/result.py", line 228, in get
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     on_message=on_message,
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/celery/backends/asynchronous.py", line 200, in wait_for_pending
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     for _ in self._wait_for_pending(result, **kwargs):
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/celery/backends/asynchronous.py", line 268, in _wait_for_pending
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     on_interval=on_interval):
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/celery/backends/asynchronous.py", line 55, in drain_events_until
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     yield self.wait_for(p, wait, timeout=interval)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/celery/backends/asynchronous.py", line 64, in wait_for
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     wait(timeout=timeout)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/celery/backends/redis.py", line 161, in drain_events
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     message = self._pubsub.get_message(timeout=timeout)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/redis/client.py", line 3135, in get_message
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     response = self.parse_response(block=False, timeout=timeout)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/redis/client.py", line 3036, in parse_response
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     return self._execute(connection, connection.read_response)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/redis/client.py", line 3013, in _execute
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     return command(*args)
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:   File "/home/emailv-completed/env/lib/python3.7/site-packages/redis/connection.py", line 642, in read_response
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]:     raise response
Jun 14 04:17:01 hamza2.pawnhost.com gunicorn[24450]: redis.exceptions.ResponseError: wrong number of arguments for 'subscribe' command

How can I fix this error

I’m using Django celery and Redis

Version: redis==3.2.1,celery==4.4.2,

Platform: python3.7 | ubuntu 16.04

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 15 (5 by maintainers)

Most upvoted comments

I have the ‘ redis.exceptions.ResponseError: wrong number of arguments for ‘subscribe’ command’ issue with: Azure for cache Redis server 6.14 Celery 5.1.2 Redis-py 3.5.3

so the issue is not sorted Any news on what needs to be done?

Same for redis in google cloud memorystore. redis-py 3.5.3, celery 5.1.2.

ResponseError: wrong number of arguments for 'subscribe' command
 File "redis/client.py", line 3617, in get_message
    response = self.parse_response(block=False, timeout=timeout)
  File "redis/client.py", line 3505, in parse_response
    response = self._execute(conn, conn.read_response)
  File "redis/client.py", line 3479, in _execute
    return command(*args, **kwargs)
  File "redis/connection.py", line 756, in read_response
    raise response

I would think that celery is probably the one sending the wrong arguments here but I don’t think its https://github.com/celery/celery/issues/6335 as I don’t have any sort of asynchronous code running.