celery 在 centos 5.4 上无法启动
我使用“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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要安装最新版本的
pyparsing
您可以通过执行以下操作来完成此操作:
You need to install the latest version of
pyparsing
You can do so by doing: