Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

django

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.
like image 557
Adriann Sanchez Sierra Avatar asked Oct 10 '15 17:10

Adriann Sanchez Sierra


2 Answers

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.

like image 143
jbasko Avatar answered Oct 16 '22 11:10

jbasko


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.)

like image 2
eclewlow Avatar answered Oct 16 '22 12:10

eclewlow