Django 1.8 无法启动
Django 1.8 won't start
迁移到 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
我找不到该问题的解决方案:/
我想我找到了问题所在。我使用 celery
并使其在 Django 1.7
中工作,我必须将此行添加到 celery.py
django.setup()
删除它后,celery
和我的应用程序都开始工作了:)
@Brandon 你是 100% 正确的——这个异常没有说明任何问题;)
迁移到 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
我找不到该问题的解决方案:/
我想我找到了问题所在。我使用 celery
并使其在 Django 1.7
中工作,我必须将此行添加到 celery.py
django.setup()
删除它后,celery
和我的应用程序都开始工作了:)
@Brandon 你是 100% 正确的——这个异常没有说明任何问题;)