Wednesday, November 30, 2016

celery错误

使用celery发现如下错误,配置的一个虚拟环境中可以运行,但是root环境确不可以。通过卸载 redis-py,重新安装redis解决,感觉可能是其他插件的原因。目前没有重现,重现后再好好找找原因。错误记录如下:
[2016-11-30 10:47:49,779: CRITICAL/MainProcess] Unrecoverable error: TypeError("can_read() got an unexpected keyword argument 'timeout'",)
Traceback (most recent call last):
  File "/anaconda/lib/python2.7/site-packages/celery/worker/worker.py", line 203, in start
    self.blueprint.start(self)
  File "/anaconda/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
    step.start(parent)
  File "/anaconda/lib/python2.7/site-packages/celery/bootsteps.py", line 370, in start
    return self.obj.start()
  File "/anaconda/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 318, in start
    blueprint.start(self)
  File "/anaconda/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
    step.start(parent)
  File "/anaconda/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 584, in start
    c.loop(*c.loop_args())
  File "/anaconda/lib/python2.7/site-packages/celery/worker/loops.py", line 88, in asynloop
    next(loop)
  File "/anaconda/lib/python2.7/site-packages/kombu/async/hub.py", line 345, in create_loop
    cb(*cbargs)
  File "/anaconda/lib/python2.7/site-packages/kombu/transport/redis.py", line 1038, in on_readable
    self.cycle.on_readable(fileno)
  File "/anaconda/lib/python2.7/site-packages/kombu/transport/redis.py", line 337, in on_readable
    chan.handlers[type]()
  File "/anaconda/lib/python2.7/site-packages/kombu/transport/redis.py", line 670, in _receive
    while c.connection.can_read(timeout=0):
TypeError: can_read() got an unexpected keyword argument 'timeout'

No comments:

Post a Comment