kombu.exceptions.VersionMismatch: Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6问题

问题:

(env) D:\python_learn\meiduo_project\meiduo_mall>celery -A celery_tasks.main worker -l info

 -------------- celery@CZZI-BBMGSW v4.4.7 (cliffs)
--- ***** -----
-- ******* ---- Windows-7-6.1.7601-SP1 2020-08-11 19:54:42
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app:         meiduo:0x3765fa0
- ** ---------- .> transport:   redis://localhost:6379/7
- ** ---------- .> results:     disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery


[tasks]
  . ccp_send_sms_code
  . send_verify_email
  . sku_static_html

[2020-08-11 19:54:42,213: CRITICAL/MainProcess] Unrecoverable error: VersionMismatch('Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6')
Traceback (most recent call last):
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\transport\virtual\base.py", line 921, in create_channel
    return self._avail_channels.pop()
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\worker\worker.py", line 208, in start
    self.blueprint.start(self)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\bootsteps.py", line 119, in start
    step.start(parent)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\bootsteps.py", line 369, in start
    return self.obj.start()
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\worker\consumer\consumer.py", line 318, in start
    blueprint.start(self)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\bootsteps.py", line 119, in start
    step.start(parent)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\worker\consumer\connection.py", line 23, in start
    c.connection = c.connect()
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\worker\consumer\consumer.py", line 405, in connect
    conn = self.connection_for_read(heartbeat=self.amqheartbeat)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\worker\consumer\consumer.py", line 411, in connection_for_read
    return self.ensure_connected(
  File "d:\python_learn\meiduo_project\env\lib\site-packages\celery\worker\consumer\consumer.py", line 437, in ensure_connected
    conn = conn.ensure_connection(
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\connection.py", line 389, in ensure_connection
    self._ensure_connection(*args, **kwargs)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\connection.py", line 441, in _ensure_connection
    return retry_over_time(
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\utils\functional.py", line 344, in retry_over_time
    return fun(*args, **kwargs)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\connection.py", line 874, in _connection_factory
    self._connection = self._establish_connection()
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\connection.py", line 809, in _establish_connection
    conn = self.transport.establish_connection()
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\transport\virtual\base.py", line 941, in establish_connection
    self._avail_channels.append(self.create_channel(self))
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\transport\virtual\base.py", line 923, in create_channel
    channel = self.Channel(connection)
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\transport\redis.py", line 505, in __init__
    self.Client = self._get_client()
  File "d:\python_learn\meiduo_project\env\lib\site-packages\kombu\transport\redis.py", line 978, in _get_client
    raise VersionMismatch(
kombu.exceptions.VersionMismatch: Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6
[2020-08-11 19:54:42,483: INFO/SpawnPoolWorker-1] child process 8884 calling self.run()
[2020-08-11 19:54:42,488: INFO/SpawnPoolWorker-2] child process 9120 calling self.run()
[2020-08-11 19:54:42,562: INFO/SpawnPoolWorker-4] child process 7884 calling self.run()
[2020-08-11 19:54:42,579: INFO/SpawnPoolWorker-3] child process 9036 calling self.run()

升级redis到最新版本问题解决:

pip install redis

 

posted @ 2020-08-11 20:18  sewen  Views(1123)  Comments(0Edit  收藏  举报