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


    问题:

    (env) D:python_learnmeiduo_projectmeiduo_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_learnmeiduo_projectenvlibsite-packageskombu	ransportvirtualase.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_learnmeiduo_projectenvlibsite-packagesceleryworkerworker.py", line 208, in start
        self.blueprint.start(self)
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryootsteps.py", line 119, in start
        step.start(parent)
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryootsteps.py", line 369, in start
        return self.obj.start()
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryworkerconsumerconsumer.py", line 318, in start
        blueprint.start(self)
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryootsteps.py", line 119, in start
        step.start(parent)
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryworkerconsumerconnection.py", line 23, in start
        c.connection = c.connect()
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryworkerconsumerconsumer.py", line 405, in connect
        conn = self.connection_for_read(heartbeat=self.amqheartbeat)
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryworkerconsumerconsumer.py", line 411, in connection_for_read
        return self.ensure_connected(
      File "d:python_learnmeiduo_projectenvlibsite-packagesceleryworkerconsumerconsumer.py", line 437, in ensure_connected
        conn = conn.ensure_connection(
      File "d:python_learnmeiduo_projectenvlibsite-packageskombuconnection.py", line 389, in ensure_connection
        self._ensure_connection(*args, **kwargs)
      File "d:python_learnmeiduo_projectenvlibsite-packageskombuconnection.py", line 441, in _ensure_connection
        return retry_over_time(
      File "d:python_learnmeiduo_projectenvlibsite-packageskombuutilsfunctional.py", line 344, in retry_over_time
        return fun(*args, **kwargs)
      File "d:python_learnmeiduo_projectenvlibsite-packageskombuconnection.py", line 874, in _connection_factory
        self._connection = self._establish_connection()
      File "d:python_learnmeiduo_projectenvlibsite-packageskombuconnection.py", line 809, in _establish_connection
        conn = self.transport.establish_connection()
      File "d:python_learnmeiduo_projectenvlibsite-packageskombu	ransportvirtualase.py", line 941, in establish_connection
        self._avail_channels.append(self.create_channel(self))
      File "d:python_learnmeiduo_projectenvlibsite-packageskombu	ransportvirtualase.py", line 923, in create_channel
        channel = self.Channel(connection)
      File "d:python_learnmeiduo_projectenvlibsite-packageskombu	ransport
    edis.py", line 505, in __init__
        self.Client = self._get_client()
      File "d:python_learnmeiduo_projectenvlibsite-packageskombu	ransport
    edis.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
  • 相关阅读:
    【NLP】UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 74752: ordinal not in rang
    【Android】Android学习过程中的一些网站
    【Java】第10章 内部类
    【Java】第7章 复用类
    【Linux】Ubuntu下安装QQ
    【Java】第9章 接口
    【Java】第8章 多态
    【Coding】用筛法求素数的C++实现(附100000以内素数表)
    【Android】挺好用的chart engine,可用于Android画饼图,条形图等
    【Coding】Visual Studio中最常用的13个快捷键
  • 原文地址:https://www.cnblogs.com/sewen-H/p/13479788.html
Copyright © 2020-2023  润新知