2016-03-29 148 views
0

我想设置芹菜Django上的问题我使用django example app递归问题

我设置的virtualenv使用以下命令

pip install virtualenv 
virtualenv ..\env 
call ..\env\Scripts\activate 
pip install celery 
pip install django 

这给了我下面的环境

amqp==1.4.9 
anyjson==0.3.3 
billiard==3.3.0.23 
celery==3.1.23 
Django==1.9.4 
kombu==3.0.35 
pytz==2016.3 

,并试图通过命令来启动工作后

$ celery -A proj worker -l info 

我结束了运行时错误

File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
    File "C:\Python27\Lib\functools.py", line 56, in <lambda> 
    '__lt__': [('__gt__', lambda self, other: other < self), 
RuntimeError: maximum recursion depth exceeded while calling a Python object 

你有一个想法是什么,我做错了什么?

+1

请参考此答案 - http://stackoverflow.com/a/21834988/5121725 – RA123

+0

@ RA123感谢您的快速回答,它指向我正确的方向我已经过时的Python 2.7.2我更新到Python 2.7.11这是最新的此刻,它的工作。如果你可以创建答案,我会接受它,因为你是第一个谢谢。 – Zgr3doo

回答

2

问题出在functools.py文件中。
要解决该问题更换转换字典文件functools.py(约在python线56 \ LIB \ functools.py):

convert = { 
'__lt__': [('__gt__', lambda self, other: other < self), 
      ('__le__', lambda self, other: not other < self), 
      ('__ge__', lambda self, other: not self < other)], 
'__le__': [('__ge__', lambda self, other: other <= self), 
      ('__lt__', lambda self, other: not other <= self), 
      ('__gt__', lambda self, other: not self <= other)], 
'__gt__': [('__lt__', lambda self, other: other > self), 
      ('__ge__', lambda self, other: not other > self), 
      ('__le__', lambda self, other: not self > other)], 
'__ge__': [('__le__', lambda self, other: other >= self), 
      ('__gt__', lambda self, other: not other >= self), 
      ('__lt__', lambda self, other: not self >= other)] 
} 

该值

convert = { 
'__lt__': [('__gt__', lambda self, other: not (self < other or self == other)), 
      ('__le__', lambda self, other: self < other or self == other), 
      ('__ge__', lambda self, other: not self < other)], 
'__le__': [('__ge__', lambda self, other: not self <= other or self == other), 
      ('__lt__', lambda self, other: self <= other and not self == other), 
      ('__gt__', lambda self, other: not self <= other)], 
'__gt__': [('__lt__', lambda self, other: not (self > other or self == other)), 
      ('__ge__', lambda self, other: self > other or self == other), 
      ('__le__', lambda self, other: not self > other)], 
'__ge__': [('__le__', lambda self, other: (not self >= other) or self == other), 
      ('__gt__', lambda self, other: self >= other and not self == other), 
      ('__lt__', lambda self, other: not self >= other)] 
}