Python Django populate() isn't reentrant
<p>I've had a program that has been running fine for months.  I've been trying to install Postfix on the server this morning and suddenly start getting an error on the site.  Here is the traceback</p>

<pre><code>mod_wsgi (pid=11948): Target WSGI script '/var/www/zouzoukos/zouzoukos/wsgi.py$
mod_wsgi (pid=11948): Exception occurred processing '/var/www/zouzoukos/zouzoukos/wsgi.py'.
Traceback (most recent call last):
   File "/var/www/zouzoukos/zouzoukos/wsgi.py", line 29, in &lt;module&gt;
     application = get_wsgi_application()
   File "/var/www/zouzoukos/env/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
     django.setup()
   File "/var/www/zouzoukos/env/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
     apps.populate(settings.INSTALLED_APPS)
"/var/www/zouzoukos/env/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
raise RuntimeError("populate() isn't reentrant")
RuntimeError: populate() isn't reentrant
</code></pre>

<p>The thing is, I have a couple more versions of the site running for other people and they're still fine (this was the first).  I cannot understand what I need to update to get it working again.</p>

<p>I've tried everything in <a href="http://stackoverflow.com/questions/30954398/django-populate-isnt-reentrant">this thread</a> and still nothing</p>

<p>This error basically means that something is already tried to mess with <code>app_config</code> ordered dict from <code>Apps</code> class before django was able to setup installed apps properly in first place. Check <code>django.apps.registry.Apps#populate</code>, it sais:</p>

<pre><code># app_config should be pristine, otherwise the code below won't
# guarantee that the order matches the order in INSTALLED_APPS.
if self.app_configs:
    raise RuntimeError("populate() isn't reentrant")
</code></pre>

<p>Try to check what's in this <code>app_config</code> dictionary to get more information. Also just restarting all the things might help.</p>

python django