Python windows上芹菜示例Django应用程序的递归问题
我在使用的Django上安装芹菜时遇到问题 我使用以下命令设置virtualenvPython windows上芹菜示例Django应用程序的递归问题,python,django,python-2.7,celery,Python,Django,Python 2.7,Celery,我在使用的Django上安装芹菜时遇到问题 我使用以下命令设置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
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
在尝试通过命令启动worker之后
$ 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
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
文件“C:\Python27\Lib\functools.py”,第56行,在
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
RuntimeError:调用Python对象时超出了最大递归深度
你知道我做错了什么吗?问题出在functools.py文件中。
要解决此问题,请替换文件functools.py中的convert dictionary(关于python\Lib\functools.py中的第56行):
convert={
“\uuult\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
(“lambda self,其他:非其他<自身),
(“自我”,lambda self,其他:非自我<其他)],
“\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
“\uuuu ge\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
(“lambda self,其他:非其他>=自身),
(“lambda self,其他:非self>=其他)]
}
对该值进行调整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)]
}
convert={
“uuu lt_uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu,
(“自我”,lambda self,other:self=其他而非self==其他),
(“lambda self,其他:非self>=其他)]
}
问题出在functools.py文件中。要解决此问题,请在文件中替换convert dictionary
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)]
}