Celery AttributeError: async error

后端 未结 6 1033
别那么骄傲
别那么骄傲 2021-01-31 13:50

I have RabbitMQ and Celery running locally on my Mac (OS/X 10.13.4), the following code works locally when I run add.delay(x,y):

#!/usr/bin/env python
from celer         


        
6条回答
  •  一个人的身影
    2021-01-31 14:23

    That was the issue, it was in fact the kombu version.

    I managed to get 2 versions of kombu installed, 4.2.0 as the 'appuser' user, which I was trying to start the worker under, and 4.1.0 as 'root'. The 4.1.0 as 'root' would work, the other user did not.

    I removed kombu 4.2.0 from the 'appuser' user account (pip uninstall kombu as that user), so it would use the system-wide installed package, and the Celery worker operated correctly under that account.

    To verify that it is in fact kombu 4.2.0 that breaks, I removed the system-wide 4.1.0 version and let pip install the latest version, which it gets as 4.2.0, and the Celery worker would no longer start. I uninstalled it and forced pip to install 4.1.0 (pip install kombu==4.1.0) and the worker operated correctly.

    As another check I went to my Mac, where I originally wrote/tested this code, and checked the kombu version installed there by pip: 4.1.0. I'm not sure why pip on the Mac and Pi3 installed the 4.1.0 version of kombu while pip on the ODROID-C2 installed the 4.2.0 version. I'll dig more if I get a chance but it works now.

提交回复
热议问题