celery 在 centos 5.4 上无法启动

发布于 2024-10-10 03:36:52 字数 2050 浏览 2 评论 0原文

我使用“pip install celery”安装 celery 并设置 celeryconfig.py 以与在同一网络中运行的另一台服务器上运行的rabbitmq 服务器进行通信。 我的python版本是2.7 当我尝试运行 start celeryd 时,出现以下错误:

# celeryd -l info -I tasks
Traceback (most recent call last):
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/bin/celeryd", line 9, in  <module>
load_entry_point('celery==2.1.4', 'console_scripts', 'celeryd')()
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/bin/celeryd.py", line 166, in main
worker.execute_from_commandline()
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/bin/base.py", line 40, in execute_from_commandline
return self.run(*args, **vars(options))
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/bin/celeryd.py", line 83, in run
from celery.apps.worker import Worker
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/apps/worker.py", line 15, in <module>
from celery.task import discard_all
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/task/__init__.py", line 12, in <module>
from celery.task.builtins import PingTask, ExecuteRemoteTask
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/task/builtins.py", line 18, in <module>
schedule=crontab(minute="00", hour="04", day_of_week="*"))
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/schedules.py", line 236, in __init__
self.hour = self._expand_cronspec(hour, 24)
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/schedules.py", line 211, in _expand_cronspec
result = crontab_parser(max_).parse(cronspec)
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/schedules.py", line 144, in parse
return self.parser.parseString(cronspec).pop()
TypeError: 'str' object is not callable

I install celery using "pip install celery" and setup the celeryconfig.py to talk to the rabbitmq server running on another server running in the same network.
The python version i have is 2.7
When i try to run start celeryd i get the following error:

# celeryd -l info -I tasks
Traceback (most recent call last):
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/bin/celeryd", line 9, in  <module>
load_entry_point('celery==2.1.4', 'console_scripts', 'celeryd')()
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/bin/celeryd.py", line 166, in main
worker.execute_from_commandline()
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/bin/base.py", line 40, in execute_from_commandline
return self.run(*args, **vars(options))
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/bin/celeryd.py", line 83, in run
from celery.apps.worker import Worker
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/apps/worker.py", line 15, in <module>
from celery.task import discard_all
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/task/__init__.py", line 12, in <module>
from celery.task.builtins import PingTask, ExecuteRemoteTask
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/task/builtins.py", line 18, in <module>
schedule=crontab(minute="00", hour="04", day_of_week="*"))
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/schedules.py", line 236, in __init__
self.hour = self._expand_cronspec(hour, 24)
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/schedules.py", line 211, in _expand_cronspec
result = crontab_parser(max_).parse(cronspec)
File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/celery/schedules.py", line 144, in parse
return self.parser.parseString(cronspec).pop()
TypeError: 'str' object is not callable

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

好菇凉咱不稀罕他 2024-10-17 03:36:52

您需要安装最新版本的 pyparsing

您可以通过执行以下操作来完成此操作:

pip install -U pyparsing

You need to install the latest version of pyparsing

You can do so by doing:

pip install -U pyparsing
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文