Django populate () не может быть повторно введен - PullRequest
0 голосов
/ 27 мая 2019

Я продолжаю получать это, когда пытаюсь загрузить свое приложение Django в производство. Я перепробовал все ответы на stackoverflow, но ничего не устранило. Любые другие идеи. Вот мой wsgi.py

import os
import time
import traceback
import signal
import sys
from django.core.wsgi import get_wsgi_application
try:
    application = get_wsgi_application()
    print 'WSGI without exception'
except Exception:
    print 'handling WSGI exception'
    # Error loading applications
    if 'mod_wsgi' in sys.modules:
        traceback.print_exc()
        os.kill(os.getpid(), signal.SIGINT)
        time.sleep(2.5)

и что я получил

[Mon May 27 18:09:41.654452 2019] [wsgi:error] [pid 15704:tid 1300] handling WSGI exception\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300] Traceback (most recent call last):\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]   File "D:/soft_design/project_soft/project_soft/wsgi.py", line 26, in <module>\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]     application = get_wsgi_application()\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]   File "C:\\Users\\Scott\\Anaconda3\\envs\\py37\\lib\\site-packages\\django\\core\\wsgi.py", line 12, in get_wsgi_application\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]     django.setup(set_prefix=False)\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]   File "C:\\Users\\Scott\\Anaconda3\\envs\\py37\\lib\\site-packages\\django\\__init__.py", line 24, in setup\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]     apps.populate(settings.INSTALLED_APPS)\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]   File "C:\\Users\\Scott\\Anaconda3\\envs\\py37\\lib\\site-packages\\django\\apps\\registry.py", line 83, in populate\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300]     raise RuntimeError("populate() isn't reentrant")\r
[Mon May 27 18:09:41.655450 2019] [wsgi:error] [pid 15704:tid 1300] RuntimeError: populate() isn't reentrant\r
[Mon May 27 18:09:41.676394 2019] [mpm_winnt:crit] [pid 3488:tid 620] AH00427: Parent: child process 15704 exited with status 2 -- Aborting.
...