本文介绍了Django 1.8到1.9升级:django.core.exceptions.AppRegistryNotReady:应用程序尚未加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个目前正在Django 1.8工作的项目。由于1.9刚刚发布,我以为我会通过 pip install django == 1.9 更新。但是,当运行 python manage.py test -v 3 时,我收到以下错误: code>追溯(最近的最后一次呼叫):文件manage.py,第11行在< module> execute_from_command_line(sys.argv)文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/core/management/__init__.py,第350行, execute_from_command_line utility.execute()文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/core/management/__init__.py,第324行,执行 django.setup()文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/__init__.py,第18行,设置 apps.populate(settings.INSTALLED_APPS)文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/apps/registry.py,第85行,填入 app_config = AppConfig.create(entry)文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/apps/config.py,第90行,创建 module = import_module(entry)文件/usr/lib64/python2.7/importlib/__init__.py,第37行,import_module __import __(name)文件 /home/user/Envs/intranet/lib/python2.7/site-packages/re version / __ init__.py,第11行,在< module> from reversion.revisions import default_revision_manager,revision_context_manager,VersionAdapter 文件/home/user/Envs/intranet/lib/python2.7/site-packages/reversion/revisions.py,第18行, <模块> from django.contrib.contenttypes.models import ContentType 文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/contrib/contenttypes/models.py, < module>中的第159行 class ContentType(models.Model):文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/db/models/base.py,第94行,在__new__ app_config = apps.get_containing_app_config(module)文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/apps/registry.py,行239,in get_containing_app_config self.check_apps_ready()文件/home/user/Envs/intranet/lib/python2.7/site-packages/django/apps/registry.py,第124行,在check_apps_ready raise AppRegistryNotReady(Apps尚未加载。) django.core.exceptions.AppRegistryNotReady:应用程序尚未加载。 我知道INSTALLED_APPS从元组更改为列表。 还有其他可能会错过的?解决方案尝试升级django-reversion,今天发布 1.10版本,其中包含:来自讨论组的消息 https://groups.google.com/forum/#!topic/django-reversion/3AQipnbKaUI I have a project currently working on Django 1.8. Since 1.9 just released, I thought I would update via pip install django==1.9. However, when running python manage.py test -v 3, I get this error:Traceback (most recent call last): File "manage.py", line 11, in <module> execute_from_command_line(sys.argv) File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line utility.execute() File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/core/management/__init__.py", line 324, in execute django.setup() File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/__init__.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/home/user/Envs/intranet/lib/python2.7/site-packages/reversion/__init__.py", line 11, in <module> from reversion.revisions import default_revision_manager, revision_context_manager, VersionAdapter File "/home/user/Envs/intranet/lib/python2.7/site-packages/reversion/revisions.py", line 18, in <module> from django.contrib.contenttypes.models import ContentType File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/contrib/contenttypes/models.py", line 159, in <module> class ContentType(models.Model): File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/db/models/base.py", line 94, in __new__ app_config = apps.get_containing_app_config(module) File "/home/user/Envs/intranet/lib/python2.7/site-packages/django/apps/registry.py", line 239, in get_containing_app_config self.check_apps_ready() File "/home/user/Envs/intranet/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.I am aware that INSTALLED_APPS changed from a tuple to a list.Anything else that I might have missed? 解决方案 Try to upgrade django-reversion, today was released 1.10 version with:message from discussion groups https://groups.google.com/forum/#!topic/django-reversion/3AQipnbKaUI 这篇关于Django 1.8到1.9升级:django.core.exceptions.AppRegistryNotReady:应用程序尚未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!