启动django的服务时候报错RuntimeError: maximum recursion depth exceeded in cmp
2017-07-04 09:44
567 查看
原文:http://blog.csdn.net/yingzinanfei/article/details/54862551
启动django服务时报错:
RuntimeError: maximum recursion depth exceeded in cmp
解决方法:
原因出自Python\Lib\fuctools.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)]
}
启动django服务时报错:
RuntimeError: maximum recursion depth exceeded in cmp
解决方法:
原因出自Python\Lib\fuctools.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)]
}
相关文章推荐
- django启动的时候报错RuntimeError: maximum recursion depth exceeded in cmp
- Django启动服务器报错:maximum recursion depth exceeded in cmp
- win10启动django项目报错 Django RuntimeError: maximum recursion depth exceeded
- win10启动django项目报错 Django RuntimeError: maximum recursion depth exceeded
- Python RuntimeError: maximum recursion depth exceeded in cmp 超过最大递归深度错误
- RuntimeError: maximum recursion depth exceeded in cmp
- python setup.py install 出现了 RuntimeError: maximum recursion depth exceeded in cmp
- 启动django项目报错:RuntimeError: maximum recursion depth exceeded while calling a Python object
- 安装Django启动时报错:RuntimeError: maximum recursion depth exceeded
- 爬豆瓣影评,记下解决maximum recursion depth exceeded in cmp
- Django RuntimeError: maximum recursion depth exceeded
- RuntimeError: maximum recursion depth exceeded 递归深度报错
- RuntimeError: maximum recursion depth exceeded
- python递归深度报错--RuntimeError: maximum recursion depth exceeded
- 当python超出默认递归次数RecursionError: maximum recursion depth exceeded in comparison
- python递归深度报错--RuntimeError: maximum recursion depth exceeded
- 记 suds 模块循环依赖的坑-RuntimeError: maximum recursion depth exceeded
- python使用pip安装一个module时报错:RuntimeError: maximum recursion depth exceeded
- python RuntimeError: maximum recursion depth exceeded
- python递归深度报错--RuntimeError: maximum recursion depth exceeded