我想在Django項目網站上學習Django的第一個教程。我可能會丟失一些東西很明顯,但以下所有的指令後,當我來運行命令Django:python manage.py runserver給出RuntimeError:在cmp中超出最大遞歸深度
python manage.py runserver
我得到張貼在此請求幫助結束的錯誤(我已經發布只有前幾行爲了簡潔,錯誤消息的重複行)。
以下是我在網上找到的一些解決方案/建議,但對我沒有幫助。
1)sys.setrecursionlimit(1500)。
這不適合我。 2)。 Django RuntimeError: maximum recursion depth exceeded
這也不是一個選項,因爲我沒有使用PyDeV,我嘗試使用pip卸載和安裝Django它沒有修復任何東西,我使用的是山獅的原生python,我不打算卸載,因爲它不被推薦。 3)。我也試過:
python manage.py runserver --settings=mysite.settings
完全相同的錯誤作爲命令沒有的選項設置
任何建議,建議將不勝感激。我正在使用.... Django正式版。 1.5.1我使用PIP和Python 2.7.2安裝
Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x10f7ee5d0>>
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run
self.validate(display_num_errors=True)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 280, in validate
num_errors = get_validation_errors(s, app)
File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 35, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 166, in get_app_errors
self._populate()
File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 72, in _populate
self.load_app(app_name, True)
File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 96, in load_app
models = import_module('.models', app_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/django/contrib/auth/models.py", line 370, in <module>
class AbstractUser(AbstractBaseUser, PermissionsMixin):
File "/Library/Python/2.7/site-packages/django/db/models/base.py", line 213, in __new__
new_class.add_to_class(field.name, copy.deepcopy(field))
File "/Library/Python/2.7/site-packages/django/db/models/base.py", line 265, in add_to_class
value.contribute_to_class(cls, name)
File "/Library/Python/2.7/site-packages/django/db/models/fields/__init__.py", line 257, in contribute_to_class
cls._meta.add_field(self)
File "/Library/Python/2.7/site-packages/django/db/models/options.py", line 179, in add_field
self.local_fields.insert(bisect(self.local_fields, field), field)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
RuntimeError: maximum recursion depth exceeded in cmp
UPDATE: 所以我落得這樣做是爲了做安裝VirtualBox的,就可以安裝免費的Ubuntu,然後移動到完成的矯枉過正教程...哦,好!
你有上您有任何類oveerridden cmp? – 2013-04-28 04:53:45
[這是另一個問題,同樣的問題。](http://stackoverflow.com/questions/15236556/django-runtimeerror-maximum-recursion-depth-exceeded) – icktoofay 2013-04-28 04:55:07
@akshar不是我所知的最好的。 – 2013-04-28 06:16:42