2013-01-14 2 views
3

E : 검증 모델의 runserver \ pythonwebproject \ pythonweb> 파이썬 manage.py ...Django 서버를 실행할 수 없습니다. 이유가 무엇입니까?

Unhandled exception in thread started by <function wrapper at 0x01DE69F0> 

Traceback (most recent call last): 

    File "C:\Python26\Lib\site-packages\django\utils\autoreload.py", line 93, in wrapper 
    fn(*args, **kwargs) 

    File "C:\Python26\Lib\site-packages\django\core\management\commands\runserver.py", line 92, in inner_r 

    self.validate(display_num_errors=True) 

    File "C:\Python26\Lib\site-packages\django\core\management\base.py", line 277, in validate 

    num_errors = get_validation_errors(s, app) 

    File "C:\Python26\Lib\site-packages\django\core\management\validation.py", line 35, in get_validation_ 

    for (app_name, error) in get_app_errors().items(): 

    File "C:\Python26\Lib\site-packages\django\db\models\loading.py", line 166, in get_app_errors 

    self._populate() 

    File "C:\Python26\Lib\site-packages\django\db\models\loading.py", line 72, in _populate 
    self.load_app(app_name, True) 

    File "C:\Python26\Lib\site-packages\django\db\models\loading.py", line 96, in load_app 
    models = import_module('.models', app_name) 

    File "C:\Python26\Lib\site-packages\django\utils\importlib.py", line 35, in import_module 
    __import__(name) 

    File "C:\Python26\Lib\site-packages\django\contrib\auth\models.py", line 21, in <module> 
    from django.contrib.contenttypes.models import ContentType 

    File "C:\Python26\Lib\site-packages\django\contrib\contenttypes\models.py", line 127, in <module> 
    class ContentType(models.Model): 

    File "C:\Python26\Lib\site-packages\django\db\models\base.py", line 88, in __new__ 
    new_class.add_to_class('_meta', Options(meta, **kwargs)) 

TypeError: Error when calling the metaclass bases 
    __init__() keywords must be strings 

답변

2

This bug report 내가 유사한 증상을 찾을 수있는 유일한 자원이다. 당신은 장고 1.5를 사용하고 있습니까? 파이썬 설치를 2.7로 업그레이드하고 문제가 해결되는지 확인하십시오.

+0

나는 django1.6을 사용합니다. – baoyu

+0

미래가 있습니까? :-) –

1

Python 2.6에서 개발 버전의 Django (곧 1.5)를 사용하고 있습니다. 2.7 및 3.3에서만 작동합니다. 파이썬 버전을 업그레이드하거나 릴리스 된 Django 버전 1.4를 사용해야합니다.

+0

django1.6을 사용합니다. 감사합니다. – baoyu

+5

아니요. 그런 건 없어요. Django의 마지막 릴리즈 버전은 1.4입니다. –

+1

정확히 말하면 Django 1.5는 Python 2.6.5+가 필요하고, Snow Leopard는 2.6.1입니다. –

관련 문제