问题:
[2019-06-04 14:56:56,837: INFO/MainProcess] Connected to redis://localhost:6379/0
[2019-06-04 14:56:56,849: INFO/MainProcess] mingle: searching for neighbors
[2019-06-04 14:56:57,853: INFO/MainProcess] mingle: all alone
[2019-06-04 14:56:57,861: WARNING/MainProcess] celery@nfhu-Spark-master ready.
[2019-06-04 14:58:50,222: ERROR/MainProcess] Unrecoverable error: AttributeError("'str' object has no attribute 'items'",)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/celery/worker/__init__.py", line 206, in start
self.blueprint.start(self)
File "/usr/lib/python3/dist-packages/celery/bootsteps.py", line 123, in start
step.start(parent)
File "/usr/lib/python3/dist-packages/celery/bootsteps.py", line 374, in start
return self.obj.start()
File "/usr/lib/python3/dist-packages/celery/worker/consumer.py", line 279, in start
blueprint.start(self)
File "/usr/lib/python3/dist-packages/celery/bootsteps.py", line 123, in start
step.start(parent)
File "/usr/lib/python3/dist-packages/celery/worker/consumer.py", line 838, in start
c.loop(*c.loop_args())
File "/usr/lib/python3/dist-packages/celery/worker/loops.py", line 76, in asynloop
next(loop)
File "/usr/lib/python3/dist-packages/kombu/async/hub.py", line 340, in create_loop
cb(*cbargs)
File "/usr/lib/python3/dist-packages/kombu/transport/redis.py", line 988, in on_readable
self._callbacks[queue](message)
File "/usr/lib/python3/dist-packages/kombu/transport/virtual/__init__.py", line 534, in _callback
self.qos.append(message, message.delivery_tag)
File "/usr/lib/python3/dist-packages/kombu/transport/redis.py", line 146, in append
pipe.zadd(self.unacked_index_key, delivery_tag, time()) \
File "/usr/local/lib/python3.5/dist-packages/redis/client.py", line 2320, in zadd
for pair in iteritems(mapping):
File "/usr/local/lib/python3.5/dist-packages/redis/_compat.py", line 109, in iteritems
return iter(x.items())
AttributeError: 'str' object has no attribute 'items'
解决方案:
查了好久发现原来是因为以前下的redis版本过高,重装redis
sudo pip3 install redis==2.10.6