django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. django 1.8

I have a problem with django 1.8. The console shows:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/adriann/django/project_varincenti/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 351, in execute_from_command_line
    utility.execute()
  File "/home/adriann/django/project_varincenti/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 343, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/adriann/django/project_varincenti/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 177, in fetch_command
    commands = get_commands()
  File "/home/adriann/django/project_varincenti/env/local/lib/python2.7/site-packages/django/utils/lru_cache.py", line 101, in wrapper
    result = user_function(*args, **kwds)
  File "/home/adriann/django/project_varincenti/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 72, in get_commands
    for app_config in reversed(list(apps.get_app_configs())):
  File "/home/adriann/django/project_varincenti/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 137, in get_app_configs
    self.check_apps_ready()
  File "/home/adriann/django/project_varincenti/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 124, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

Upvotes: 5

Views: 5434

Answers (3)

eclewlow
eclewlow

Reputation: 940

It looks like you are using a Virtual Environment.

Perhaps you have an app included under INSTALLED_APPS in settings.py, but it isn't installed (e.g. via pip install django-multisite) in your virtual environment.

(I received this same error after starting to use a Virtual Environment.)

Upvotes: 2

jbasko
jbasko

Reputation: 7330

There are answers elsewhere on Stackoverflow about how this could be actually about app registry, but I believe it is more often just an indicator that something is wrong in the settings and Django didn't handle failure well.

I just had the exact same error by just having a bad logger filename in LOGGING settings -- the directory I was referring to did not exist, so logger initialisation failed.

Upvotes: 4

ger.s.brett
ger.s.brett

Reputation: 3308

I actually had the same error today, which is strange as everything was working properly yesterday and I do not think I have changed anything. I got the error when trying to start up the dev server. I had recently upgraded this project to 1.8.

The solution for me was: I changed my PYTHONPATH on the startup script (to make sure it also points to the 1.8 version) of the dev server and everything seemed to work perfectly again.

Upvotes: 1

Related Questions