Cannot start Celery Worker (Kombu.asynchronous.timer)

断了今生、忘了曾经 提交于 2019-12-05 07:21:45

I have the same problem, but solved it when reinstall celery with version 3.1.25

pip uninstall celery && pip install celery==3.1.25

Maybe because windows is not officially supported by celery 4, https://github.com/celery/celery/issues/3551

TL;DR: remove the kombu directory from the root of your virtualenv (if it exists). It may only fail on Windows.

It seems to be a quirk. I found the same error and I checked out what was happening.

The wheel package that pip downloads looks fine (kombu.asynchronous.timer exists in it). The release for the last version (currently 4.2.0) also is fine. What was strange is what I found in my virtualenv installation.

I found a kombu directory at my virtualenv root which has the content of the library but it also has an "async" directory, alongside an "asynchronous" one. These directories aren't from the 4.2.0 release, as async has the timer.py file but asynchronous doesn't.

From where did it come? It appears that from the wheel's data directory.

So, the solution: I removed the kombu directory from the root of my virtualenv and celery worked.

I tested celery on the same python version you have and it is okay. and also https://github.com/celery/kombu/blob/master/kombu/asynchronous/timer.py shows that renaming things randomly is not going to help you. Maybe you should try pip uninstall kombu && pip --no-cache-dir install -U kombu to perform a fresh install for kombu. I guess there must be something wrong with your installation. so if the kombu reinstall thing didn't work, try installing the whole thing again.

I just started with Celery. I followed instructions and installed Celery v 4.2.0

when I was trying to run the command : celery -A mysite worker -l info I got the error :

ModuleNotFoundError: No module named 'kombu.asynchronous.timer

I removed Celery installation : pip uninstall celery

Afterwards installed Celery 3.1.25 as 'chuhy' recommended

but..It had some other issues, so I immediately un-installed 3.1.25 , and reinstalled celery v4.2.0 .

After this scenario the error didn't pop again.

I work on Windows so I had a bit of problem with this. But my solution was to create new conda env with python 3.6.8 ( as i have understand celery may work on python 3.7 but have lot of problems). Then proceed to install latest versions of celery(4.3.0) and Django(2.2.3) and after that everything worked fine.

I had this issue with the default Celery installation from pip (3.1.26Post2). As mentionned above, I installed instead version 3.1.25, but Celery was still not working. Thus I explicitly installed the latest version:

pip install Celery==4.3

and everything is working now!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!