I have a website running django 1.7.4 and i am trying to upgrade to django 1.9.5:
When I run ./manage.py runserver
I get:
Unhandled exception in thread started by <function wrapper at 0x111306c80>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(*_exception)
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/myuser/projects/mysite/myapp/__init__.py", line 1, in <module>
import signals
File "/Users/myuser/projects/mysite/myapp/signals.py", line 1, in <module>
from paypal.standard.models import ST_PP_COMPLETED
File "/usr/local/lib/python2.7/site-packages/paypal/standard/models.py", line 44, in <module>
class PayPalStandardBase(Model):
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 94, in __new__
app_config = apps.get_containing_app_config(module)
File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 239, in get_containing_app_config
self.check_apps_ready()
File "/usr/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.
I have django 1.7.4 installed in a virtualenv and with that version everything works fine. When i try to run it using django 1.9 this errors comes up. Any ideas?
(I have already tried to add django.setup()
to settings.py
as suggested in other answers, but it did not help (and reading the docs i feel it should not be there anyways)
Thank you for your help.