芹菜工人不奔跑



在我运行

时,The The The Trackback
celery -A tasks worker -l info

我无法弄清楚怎么了。

Traceback (most recent call last):
  File "/usr/local/bin/celery", line 9, in <module>
    load_entry_point('celery==3.1.7', 'console_scripts', 'celery')()
  File "/usr/local/lib/python2.7/dist-packages/celery/__main__.py", line 30, in main
    main()
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/celery.py", line 80, in main
    cmd.execute_from_commandline(argv)
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/celery.py", line 723, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 301, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 431, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 451, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/usr/local/lib/python2.7/dist-packages/celery/app/utils.py", line 233, in find_app
    found = sym.celery
AttributeError: 'module' object has no attribute 'celery'

最令人沮丧的部分是它昨晚没有错误。

检查旧芹菜代码的pythonpath。

我在utils.py(芹菜3.1.10)的同一条线处完全相同。

事实证明,我有一些旧目录包含芹菜版本的实验,并且通过pythonpath拾取了这些实验。我从PythonPath中删除了旧目录,一切都开始工作。

假设这是您的文件树:

应用

-> myproject

----->芹菜。Py

-> run_celery.py

其中run_celery.py包括此行:

celery -A tasks worker -l info

从一个级别的上部比芹菜。Py文件。

run_celery.py应该与myproject

处于相同的水平

相关内容

  • 没有找到相关文章

最新更新