简体   繁体   English

django-celery或python出现奇怪的错误

[英]weird error with django-celery or python

I'm having trouble running tasks. 我在执行任务时遇到问题。 I run ./manage celeryd -B -l info , it correctly loads all tasks to registry. 我运行./manage celeryd -B -l info ,它正确地将所有任务加载到注册表。

The error happens when any of the tasks run - the task starts, does its thing, and then I get: 运行任何任务时都会发生错误-任务启动,执行任务,然后得到:

[ERROR/MainProcess] Thread 'ResultHandler' crashed: ValueError('Octet out of range 0..2**64-1',)
Traceback (most recent call last):
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/concurrency/processes/pool.py", line 221, in run
    return self.body()
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/concurrency/processes/pool.py", line 458, in body
    on_state_change(task)
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/concurrency/processes/pool.py", line 436, in on_state_change
    state_handlers[state](*args)
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/concurrency/processes/pool.py", line 413, in on_ack
    cache[job]._ack(i, time_accepted, pid)
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/concurrency/processes/pool.py", line 1016, in _ack
    self._accept_callback(pid, time_accepted)
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/worker/job.py", line 424, in on_accepted
    self.acknowledge()
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/worker/job.py", line 516, in acknowledge
    self.on_ack()
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/celery/worker/consumer.py", line 405, in ack
    message.ack()
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/kombu-2.1.0-py2.7.egg/kombu/transport/base.py", line 98, in ack
    self.channel.basic_ack(self.delivery_tag)
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/amqplib-1.0.2-py2.7.egg/amqplib/client_0_8/channel.py", line 1740, in basic_ack
    args.write_longlong(delivery_tag)
  File "/Users/jzelez/Sites/my_virtual_env/lib/python2.7/site-packages/amqplib-1.0.2-py2.7.egg/amqplib/client_0_8/serialization.py", line 325, in write_longlong
    raise ValueError('Octet out of range 0..2**64-1')
ValueError: Octet out of range 0..2**64-1

I also must note that this worked on my previous Lion install, and even if I create a blank virtualenv with some test code, when a task runs it gives this error. 我还必须注意,这在我以前的Lion安装中有效,即使我用一些测试代码创建了空白的virtualenv,在任务运行时也会出现此错误。

This happens with Python 2.7.2 and 2.6.4. 这在Python 2.7.2和2.6.4中发生。

Django==1.3.1
amqplib==1.0.2
celery==2.4.6
django-celery==2.4.2

It appears there is some bug with homebrew install python. 看来自制安装python有一些错误。 I've now switched to the native Lion one (2.7.1) and it works. 我现在切换到本地Lion 1(2.7.1),它可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM