0

迁移到Django 1.8我的应用程序后无法启动。我得到的错误是:

Traceback (most recent call last):   File "./manage.py", line 20, in
<module>
    execute_from_command_line(sys.argv)   File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 338, in execute_from_command_line
    utility.execute()   File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 312, in execute
    django.setup()   File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/__init__.py",
line 18, in setup
    apps.populate(settings.INSTALLED_APPS)   File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/apps/registry.py",
line 78, in populate
    raise RuntimeError("populate() isn't reentrant") RuntimeError: populate() isn't reentrant

我找不到该问题的解决方案:/

4

1 回答 1

1

我想我找到了问题所在。我使用celery并使其工作,Django 1.7我必须将此行添加到celery.py

django.setup()

删除它后,celery我的应用程序都开始工作了:)

@Brandon 你是 100% 正确的——这个例外什么也没说;)

于 2015-06-09T08:54:42.320 回答