Celery CRITICAL/MainProcess] Unrecoverable error: AttributeError(“'float' object has no attribute 'items'”,)










10















I've been running a flask application with a celery worker and redis in three separated docker containers without any issue.



This is how I start it:



celery worker -A app.controller.engine.celery -l info --concurrency=2 --pool eventlet



Celery starts fine:



 -------------- celery@a828bd5b0089 v4.2.1 (windowlicker)
---- **** -----
--- * *** * -- Linux-4.9.93-linuxkit-aufs-x86_64-with 2018-11-15 16:06:59
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: app.controller.engine:0x7f8ba4eb70b8
- ** ---------- .> transport: redis://redis:6379/0
- ** ---------- .> results: redis://redis:6379/1
- *** --- * --- .> concurrency: 2 (eventlet)
-- ******* ---- .> task events: ON
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery


[tasks]
. app.controller.engine.do

INFO:engineio:Server initialized for eventlet.
INFO:engineio:Server initialized for threading.
[2018-11-15 15:44:34,301: INFO/MainProcess] Connected to redis://redis:6379/0
[2018-11-15 15:44:34,321: INFO/MainProcess] mingle: searching for neighbors
[2018-11-15 15:44:35,358: INFO/MainProcess] mingle: all alone
[2018-11-15 15:44:35,396: INFO/MainProcess] pidbox: Connected to redis://redis:6379/0.
[2018-11-15 15:44:35,415: INFO/MainProcess] celery@12af03844cd0 ready.


But when starting a task , it suddenly crashes:



[2018-11-15 15:02:03,224: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'items'",)
Traceback (most recent call last):
File "/app/env/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 369, in start
return self.obj.start()
File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 317, in start
blueprint.start(self)
File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 593, in start
c.loop(*c.loop_args())
File "/app/env/lib/python3.6/site-packages/celery/worker/loops.py", line 121, in synloop
connection.drain_events(timeout=2.0)
File "/app/env/lib/python3.6/site-packages/kombu/connection.py", line 301, in drain_events
return self.transport.drain_events(self.connection, **kwargs)
File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 963, in drain_events
get(self._deliver, timeout=timeout)
File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 359, in get
ret = self.handle_event(fileno, event)
File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 341, in handle_event
return self.on_readable(fileno), self
File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 337, in on_readable
chan.handlers[type]()
File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 724, in _brpop_read
self.connection._deliver(loads(bytes_to_str(item)), dest)
File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 983, in _deliver
callback(message)
File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 632, in _callback
self.qos.append(message, message.delivery_tag)
File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 149, in append
pipe.zadd(self.unacked_index_key, time(), delivery_tag)
File "/app/env/lib/python3.6/site-packages/redis/client.py", line 2263, in zadd
for pair in iteritems(mapping):
File "/app/env/lib/python3.6/site-packages/redis/_compat.py", line 123, in iteritems
return iter(x.items())
AttributeError: 'float' object has no attribute 'items'


I don't see any reference to my code in the stacktrace.



This is the task method:



@celery.task()
def do(module_name, json_input):
logger.info('____ Running _________________________')
logger.info('testing ***********************')
#modules.run(module_name, json_input)


I commented the call to my actual code just to verify I didn't mess it up with my modules code.. but it's crashing anyways.



Anybody has an idea what could be wrong or how to debug it properly?



Thanks a lot










share|improve this question




























    10















    I've been running a flask application with a celery worker and redis in three separated docker containers without any issue.



    This is how I start it:



    celery worker -A app.controller.engine.celery -l info --concurrency=2 --pool eventlet



    Celery starts fine:



     -------------- celery@a828bd5b0089 v4.2.1 (windowlicker)
    ---- **** -----
    --- * *** * -- Linux-4.9.93-linuxkit-aufs-x86_64-with 2018-11-15 16:06:59
    -- * - **** ---
    - ** ---------- [config]
    - ** ---------- .> app: app.controller.engine:0x7f8ba4eb70b8
    - ** ---------- .> transport: redis://redis:6379/0
    - ** ---------- .> results: redis://redis:6379/1
    - *** --- * --- .> concurrency: 2 (eventlet)
    -- ******* ---- .> task events: ON
    --- ***** -----
    -------------- [queues]
    .> celery exchange=celery(direct) key=celery


    [tasks]
    . app.controller.engine.do

    INFO:engineio:Server initialized for eventlet.
    INFO:engineio:Server initialized for threading.
    [2018-11-15 15:44:34,301: INFO/MainProcess] Connected to redis://redis:6379/0
    [2018-11-15 15:44:34,321: INFO/MainProcess] mingle: searching for neighbors
    [2018-11-15 15:44:35,358: INFO/MainProcess] mingle: all alone
    [2018-11-15 15:44:35,396: INFO/MainProcess] pidbox: Connected to redis://redis:6379/0.
    [2018-11-15 15:44:35,415: INFO/MainProcess] celery@12af03844cd0 ready.


    But when starting a task , it suddenly crashes:



    [2018-11-15 15:02:03,224: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'items'",)
    Traceback (most recent call last):
    File "/app/env/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
    self.blueprint.start(self)
    File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
    step.start(parent)
    File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 369, in start
    return self.obj.start()
    File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 317, in start
    blueprint.start(self)
    File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
    step.start(parent)
    File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 593, in start
    c.loop(*c.loop_args())
    File "/app/env/lib/python3.6/site-packages/celery/worker/loops.py", line 121, in synloop
    connection.drain_events(timeout=2.0)
    File "/app/env/lib/python3.6/site-packages/kombu/connection.py", line 301, in drain_events
    return self.transport.drain_events(self.connection, **kwargs)
    File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 963, in drain_events
    get(self._deliver, timeout=timeout)
    File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 359, in get
    ret = self.handle_event(fileno, event)
    File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 341, in handle_event
    return self.on_readable(fileno), self
    File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 337, in on_readable
    chan.handlers[type]()
    File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 724, in _brpop_read
    self.connection._deliver(loads(bytes_to_str(item)), dest)
    File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 983, in _deliver
    callback(message)
    File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 632, in _callback
    self.qos.append(message, message.delivery_tag)
    File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 149, in append
    pipe.zadd(self.unacked_index_key, time(), delivery_tag)
    File "/app/env/lib/python3.6/site-packages/redis/client.py", line 2263, in zadd
    for pair in iteritems(mapping):
    File "/app/env/lib/python3.6/site-packages/redis/_compat.py", line 123, in iteritems
    return iter(x.items())
    AttributeError: 'float' object has no attribute 'items'


    I don't see any reference to my code in the stacktrace.



    This is the task method:



    @celery.task()
    def do(module_name, json_input):
    logger.info('____ Running _________________________')
    logger.info('testing ***********************')
    #modules.run(module_name, json_input)


    I commented the call to my actual code just to verify I didn't mess it up with my modules code.. but it's crashing anyways.



    Anybody has an idea what could be wrong or how to debug it properly?



    Thanks a lot










    share|improve this question


























      10












      10








      10


      2






      I've been running a flask application with a celery worker and redis in three separated docker containers without any issue.



      This is how I start it:



      celery worker -A app.controller.engine.celery -l info --concurrency=2 --pool eventlet



      Celery starts fine:



       -------------- celery@a828bd5b0089 v4.2.1 (windowlicker)
      ---- **** -----
      --- * *** * -- Linux-4.9.93-linuxkit-aufs-x86_64-with 2018-11-15 16:06:59
      -- * - **** ---
      - ** ---------- [config]
      - ** ---------- .> app: app.controller.engine:0x7f8ba4eb70b8
      - ** ---------- .> transport: redis://redis:6379/0
      - ** ---------- .> results: redis://redis:6379/1
      - *** --- * --- .> concurrency: 2 (eventlet)
      -- ******* ---- .> task events: ON
      --- ***** -----
      -------------- [queues]
      .> celery exchange=celery(direct) key=celery


      [tasks]
      . app.controller.engine.do

      INFO:engineio:Server initialized for eventlet.
      INFO:engineio:Server initialized for threading.
      [2018-11-15 15:44:34,301: INFO/MainProcess] Connected to redis://redis:6379/0
      [2018-11-15 15:44:34,321: INFO/MainProcess] mingle: searching for neighbors
      [2018-11-15 15:44:35,358: INFO/MainProcess] mingle: all alone
      [2018-11-15 15:44:35,396: INFO/MainProcess] pidbox: Connected to redis://redis:6379/0.
      [2018-11-15 15:44:35,415: INFO/MainProcess] celery@12af03844cd0 ready.


      But when starting a task , it suddenly crashes:



      [2018-11-15 15:02:03,224: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'items'",)
      Traceback (most recent call last):
      File "/app/env/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
      self.blueprint.start(self)
      File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
      step.start(parent)
      File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 369, in start
      return self.obj.start()
      File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 317, in start
      blueprint.start(self)
      File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
      step.start(parent)
      File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 593, in start
      c.loop(*c.loop_args())
      File "/app/env/lib/python3.6/site-packages/celery/worker/loops.py", line 121, in synloop
      connection.drain_events(timeout=2.0)
      File "/app/env/lib/python3.6/site-packages/kombu/connection.py", line 301, in drain_events
      return self.transport.drain_events(self.connection, **kwargs)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 963, in drain_events
      get(self._deliver, timeout=timeout)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 359, in get
      ret = self.handle_event(fileno, event)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 341, in handle_event
      return self.on_readable(fileno), self
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 337, in on_readable
      chan.handlers[type]()
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 724, in _brpop_read
      self.connection._deliver(loads(bytes_to_str(item)), dest)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 983, in _deliver
      callback(message)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 632, in _callback
      self.qos.append(message, message.delivery_tag)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 149, in append
      pipe.zadd(self.unacked_index_key, time(), delivery_tag)
      File "/app/env/lib/python3.6/site-packages/redis/client.py", line 2263, in zadd
      for pair in iteritems(mapping):
      File "/app/env/lib/python3.6/site-packages/redis/_compat.py", line 123, in iteritems
      return iter(x.items())
      AttributeError: 'float' object has no attribute 'items'


      I don't see any reference to my code in the stacktrace.



      This is the task method:



      @celery.task()
      def do(module_name, json_input):
      logger.info('____ Running _________________________')
      logger.info('testing ***********************')
      #modules.run(module_name, json_input)


      I commented the call to my actual code just to verify I didn't mess it up with my modules code.. but it's crashing anyways.



      Anybody has an idea what could be wrong or how to debug it properly?



      Thanks a lot










      share|improve this question
















      I've been running a flask application with a celery worker and redis in three separated docker containers without any issue.



      This is how I start it:



      celery worker -A app.controller.engine.celery -l info --concurrency=2 --pool eventlet



      Celery starts fine:



       -------------- celery@a828bd5b0089 v4.2.1 (windowlicker)
      ---- **** -----
      --- * *** * -- Linux-4.9.93-linuxkit-aufs-x86_64-with 2018-11-15 16:06:59
      -- * - **** ---
      - ** ---------- [config]
      - ** ---------- .> app: app.controller.engine:0x7f8ba4eb70b8
      - ** ---------- .> transport: redis://redis:6379/0
      - ** ---------- .> results: redis://redis:6379/1
      - *** --- * --- .> concurrency: 2 (eventlet)
      -- ******* ---- .> task events: ON
      --- ***** -----
      -------------- [queues]
      .> celery exchange=celery(direct) key=celery


      [tasks]
      . app.controller.engine.do

      INFO:engineio:Server initialized for eventlet.
      INFO:engineio:Server initialized for threading.
      [2018-11-15 15:44:34,301: INFO/MainProcess] Connected to redis://redis:6379/0
      [2018-11-15 15:44:34,321: INFO/MainProcess] mingle: searching for neighbors
      [2018-11-15 15:44:35,358: INFO/MainProcess] mingle: all alone
      [2018-11-15 15:44:35,396: INFO/MainProcess] pidbox: Connected to redis://redis:6379/0.
      [2018-11-15 15:44:35,415: INFO/MainProcess] celery@12af03844cd0 ready.


      But when starting a task , it suddenly crashes:



      [2018-11-15 15:02:03,224: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'items'",)
      Traceback (most recent call last):
      File "/app/env/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
      self.blueprint.start(self)
      File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
      step.start(parent)
      File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 369, in start
      return self.obj.start()
      File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 317, in start
      blueprint.start(self)
      File "/app/env/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
      step.start(parent)
      File "/app/env/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 593, in start
      c.loop(*c.loop_args())
      File "/app/env/lib/python3.6/site-packages/celery/worker/loops.py", line 121, in synloop
      connection.drain_events(timeout=2.0)
      File "/app/env/lib/python3.6/site-packages/kombu/connection.py", line 301, in drain_events
      return self.transport.drain_events(self.connection, **kwargs)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 963, in drain_events
      get(self._deliver, timeout=timeout)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 359, in get
      ret = self.handle_event(fileno, event)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 341, in handle_event
      return self.on_readable(fileno), self
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 337, in on_readable
      chan.handlers[type]()
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 724, in _brpop_read
      self.connection._deliver(loads(bytes_to_str(item)), dest)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 983, in _deliver
      callback(message)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 632, in _callback
      self.qos.append(message, message.delivery_tag)
      File "/app/env/lib/python3.6/site-packages/kombu/transport/redis.py", line 149, in append
      pipe.zadd(self.unacked_index_key, time(), delivery_tag)
      File "/app/env/lib/python3.6/site-packages/redis/client.py", line 2263, in zadd
      for pair in iteritems(mapping):
      File "/app/env/lib/python3.6/site-packages/redis/_compat.py", line 123, in iteritems
      return iter(x.items())
      AttributeError: 'float' object has no attribute 'items'


      I don't see any reference to my code in the stacktrace.



      This is the task method:



      @celery.task()
      def do(module_name, json_input):
      logger.info('____ Running _________________________')
      logger.info('testing ***********************')
      #modules.run(module_name, json_input)


      I commented the call to my actual code just to verify I didn't mess it up with my modules code.. but it's crashing anyways.



      Anybody has an idea what could be wrong or how to debug it properly?



      Thanks a lot







      flask celery celery-task






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 '18 at 16:18







      magnoz

















      asked Nov 15 '18 at 15:10









      magnozmagnoz

      443216




      443216






















          4 Answers
          4






          active

          oldest

          votes


















          18














          The problem was that the my celery container downloaded a new release of the redis package with pip at build time, eventually with a bug or a serious change that crashes when celery tries to use it when connecting to redis. This new redis library is the 3.0.0 and it was released today.



          To fix the issue you have to specify the previous version in the requirements.txt (which is 2.10.6).



          And actually, specifying package versions in the requirements.txt is a good practice that prevents this type of problems.






          share|improve this answer


















          • 3





            Thank you so much!

            – mizhgun
            Nov 16 '18 at 19:31






          • 1





            thanks for this - saved me some time!

            – Chris Kannon
            Nov 19 '18 at 22:41






          • 1





            You are the real MVP!

            – Drugo
            Nov 30 '18 at 16:27


















          2














          I ran into this same issue today. hopefully this gets resolved shortly in an update by Celery. I reverted back to a previous version as well.






          share|improve this answer






























            2














            Not enough rep yet for a comment:



            This issue is tracked by the celery folks in:
            https://github.com/celery/celery/issues/5175



            Leading to this PR:
            https://github.com/celery/celery/pull/5176



            Which has been merged and reverted. Because some other fix landed. I'm not sure if this fixed it. It is no longer relevant for me.






            share|improve this answer

























            • It wasn't a comment XD:)

              – Gourav
              Mar 5 at 6:11


















            1














            For anyone who use the docker-airflow, I used the folk of puckel/docker-airflow
            Just need to modify the dockerfile by adding



             && pip install 'redis>=2.10.5,<3'


            replace celery[redis] with only celery, by adding celery in apache-airflow built-in module i.e.,



             && pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql]==$AIRFLOW_VERSION 


            Update:
            They also change the docker-airflow dockerfile recently to fix this bug, see here






            share|improve this answer






















              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53322425%2fcelery-critical-mainprocess-unrecoverable-error-attributeerrorfloat-object%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              18














              The problem was that the my celery container downloaded a new release of the redis package with pip at build time, eventually with a bug or a serious change that crashes when celery tries to use it when connecting to redis. This new redis library is the 3.0.0 and it was released today.



              To fix the issue you have to specify the previous version in the requirements.txt (which is 2.10.6).



              And actually, specifying package versions in the requirements.txt is a good practice that prevents this type of problems.






              share|improve this answer


















              • 3





                Thank you so much!

                – mizhgun
                Nov 16 '18 at 19:31






              • 1





                thanks for this - saved me some time!

                – Chris Kannon
                Nov 19 '18 at 22:41






              • 1





                You are the real MVP!

                – Drugo
                Nov 30 '18 at 16:27















              18














              The problem was that the my celery container downloaded a new release of the redis package with pip at build time, eventually with a bug or a serious change that crashes when celery tries to use it when connecting to redis. This new redis library is the 3.0.0 and it was released today.



              To fix the issue you have to specify the previous version in the requirements.txt (which is 2.10.6).



              And actually, specifying package versions in the requirements.txt is a good practice that prevents this type of problems.






              share|improve this answer


















              • 3





                Thank you so much!

                – mizhgun
                Nov 16 '18 at 19:31






              • 1





                thanks for this - saved me some time!

                – Chris Kannon
                Nov 19 '18 at 22:41






              • 1





                You are the real MVP!

                – Drugo
                Nov 30 '18 at 16:27













              18












              18








              18







              The problem was that the my celery container downloaded a new release of the redis package with pip at build time, eventually with a bug or a serious change that crashes when celery tries to use it when connecting to redis. This new redis library is the 3.0.0 and it was released today.



              To fix the issue you have to specify the previous version in the requirements.txt (which is 2.10.6).



              And actually, specifying package versions in the requirements.txt is a good practice that prevents this type of problems.






              share|improve this answer













              The problem was that the my celery container downloaded a new release of the redis package with pip at build time, eventually with a bug or a serious change that crashes when celery tries to use it when connecting to redis. This new redis library is the 3.0.0 and it was released today.



              To fix the issue you have to specify the previous version in the requirements.txt (which is 2.10.6).



              And actually, specifying package versions in the requirements.txt is a good practice that prevents this type of problems.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 15 '18 at 17:13









              magnozmagnoz

              443216




              443216







              • 3





                Thank you so much!

                – mizhgun
                Nov 16 '18 at 19:31






              • 1





                thanks for this - saved me some time!

                – Chris Kannon
                Nov 19 '18 at 22:41






              • 1





                You are the real MVP!

                – Drugo
                Nov 30 '18 at 16:27












              • 3





                Thank you so much!

                – mizhgun
                Nov 16 '18 at 19:31






              • 1





                thanks for this - saved me some time!

                – Chris Kannon
                Nov 19 '18 at 22:41






              • 1





                You are the real MVP!

                – Drugo
                Nov 30 '18 at 16:27







              3




              3





              Thank you so much!

              – mizhgun
              Nov 16 '18 at 19:31





              Thank you so much!

              – mizhgun
              Nov 16 '18 at 19:31




              1




              1





              thanks for this - saved me some time!

              – Chris Kannon
              Nov 19 '18 at 22:41





              thanks for this - saved me some time!

              – Chris Kannon
              Nov 19 '18 at 22:41




              1




              1





              You are the real MVP!

              – Drugo
              Nov 30 '18 at 16:27





              You are the real MVP!

              – Drugo
              Nov 30 '18 at 16:27













              2














              I ran into this same issue today. hopefully this gets resolved shortly in an update by Celery. I reverted back to a previous version as well.






              share|improve this answer



























                2














                I ran into this same issue today. hopefully this gets resolved shortly in an update by Celery. I reverted back to a previous version as well.






                share|improve this answer

























                  2












                  2








                  2







                  I ran into this same issue today. hopefully this gets resolved shortly in an update by Celery. I reverted back to a previous version as well.






                  share|improve this answer













                  I ran into this same issue today. hopefully this gets resolved shortly in an update by Celery. I reverted back to a previous version as well.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 15 '18 at 23:43









                  Rocky HolmsRocky Holms

                  478




                  478





















                      2














                      Not enough rep yet for a comment:



                      This issue is tracked by the celery folks in:
                      https://github.com/celery/celery/issues/5175



                      Leading to this PR:
                      https://github.com/celery/celery/pull/5176



                      Which has been merged and reverted. Because some other fix landed. I'm not sure if this fixed it. It is no longer relevant for me.






                      share|improve this answer

























                      • It wasn't a comment XD:)

                        – Gourav
                        Mar 5 at 6:11















                      2














                      Not enough rep yet for a comment:



                      This issue is tracked by the celery folks in:
                      https://github.com/celery/celery/issues/5175



                      Leading to this PR:
                      https://github.com/celery/celery/pull/5176



                      Which has been merged and reverted. Because some other fix landed. I'm not sure if this fixed it. It is no longer relevant for me.






                      share|improve this answer

























                      • It wasn't a comment XD:)

                        – Gourav
                        Mar 5 at 6:11













                      2












                      2








                      2







                      Not enough rep yet for a comment:



                      This issue is tracked by the celery folks in:
                      https://github.com/celery/celery/issues/5175



                      Leading to this PR:
                      https://github.com/celery/celery/pull/5176



                      Which has been merged and reverted. Because some other fix landed. I'm not sure if this fixed it. It is no longer relevant for me.






                      share|improve this answer















                      Not enough rep yet for a comment:



                      This issue is tracked by the celery folks in:
                      https://github.com/celery/celery/issues/5175



                      Leading to this PR:
                      https://github.com/celery/celery/pull/5176



                      Which has been merged and reverted. Because some other fix landed. I'm not sure if this fixed it. It is no longer relevant for me.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 26 '18 at 10:02

























                      answered Nov 19 '18 at 19:26









                      Sander BeekhuisSander Beekhuis

                      213




                      213












                      • It wasn't a comment XD:)

                        – Gourav
                        Mar 5 at 6:11

















                      • It wasn't a comment XD:)

                        – Gourav
                        Mar 5 at 6:11
















                      It wasn't a comment XD:)

                      – Gourav
                      Mar 5 at 6:11





                      It wasn't a comment XD:)

                      – Gourav
                      Mar 5 at 6:11











                      1














                      For anyone who use the docker-airflow, I used the folk of puckel/docker-airflow
                      Just need to modify the dockerfile by adding



                       && pip install 'redis>=2.10.5,<3'


                      replace celery[redis] with only celery, by adding celery in apache-airflow built-in module i.e.,



                       && pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql]==$AIRFLOW_VERSION 


                      Update:
                      They also change the docker-airflow dockerfile recently to fix this bug, see here






                      share|improve this answer



























                        1














                        For anyone who use the docker-airflow, I used the folk of puckel/docker-airflow
                        Just need to modify the dockerfile by adding



                         && pip install 'redis>=2.10.5,<3'


                        replace celery[redis] with only celery, by adding celery in apache-airflow built-in module i.e.,



                         && pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql]==$AIRFLOW_VERSION 


                        Update:
                        They also change the docker-airflow dockerfile recently to fix this bug, see here






                        share|improve this answer

























                          1












                          1








                          1







                          For anyone who use the docker-airflow, I used the folk of puckel/docker-airflow
                          Just need to modify the dockerfile by adding



                           && pip install 'redis>=2.10.5,<3'


                          replace celery[redis] with only celery, by adding celery in apache-airflow built-in module i.e.,



                           && pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql]==$AIRFLOW_VERSION 


                          Update:
                          They also change the docker-airflow dockerfile recently to fix this bug, see here






                          share|improve this answer













                          For anyone who use the docker-airflow, I used the folk of puckel/docker-airflow
                          Just need to modify the dockerfile by adding



                           && pip install 'redis>=2.10.5,<3'


                          replace celery[redis] with only celery, by adding celery in apache-airflow built-in module i.e.,



                           && pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql]==$AIRFLOW_VERSION 


                          Update:
                          They also change the docker-airflow dockerfile recently to fix this bug, see here







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 23 '18 at 2:31









                          Kevin LiKevin Li

                          1,005617




                          1,005617



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53322425%2fcelery-critical-mainprocess-unrecoverable-error-attributeerrorfloat-object%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Top Tejano songwriter Luis Silva dead of heart attack at 64

                              ReactJS Fetched API data displays live - need Data displayed static

                              政党