Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppRegistryNotReady on Django 1.7rc2 #77

Closed
iynaix opened this issue Aug 12, 2014 · 1 comment
Closed

AppRegistryNotReady on Django 1.7rc2 #77

iynaix opened this issue Aug 12, 2014 · 1 comment

Comments

@iynaix
Copy link
Contributor

iynaix commented Aug 12, 2014

I'm gettting the following traceback when starting runserver on Django 1.7rc2.

Traceback (most recent call last):
  File "./testapp/manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/media/Files/projects/testapp/env/src/django/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/media/Files/projects/testapp/env/src/django/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/media/Files/projects/testapp/env/src/django/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/media/Files/projects/testapp/env/src/django/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/media/Files/projects/testapp/env/src/django/django/apps/config.py", line 112, in create
    mod = import_module(mod_path)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/media/Files/projects/testapp/env/src/django-constance/constance/apps.py", line 5, in <module>
    class ConstanceConfig(AppConfig):
  File "/media/Files/projects/testapp/env/src/django-constance/constance/apps.py", line 7, in ConstanceConfig
    verbose_name = _('Constance')
  File "/media/Files/projects/testapp/env/src/django/django/utils/translation/__init__.py", line 83, in ugettext
    return _trans.ugettext(message)
  File "/media/Files/projects/testapp/env/src/django/django/utils/translation/trans_real.py", line 325, in ugettext
    return do_translate(message, 'ugettext')
  File "/media/Files/projects/testapp/env/src/django/django/utils/translation/trans_real.py", line 306, in do_translate
    _default = translation(settings.LANGUAGE_CODE)
  File "/media/Files/projects/testapp/env/src/django/django/utils/translation/trans_real.py", line 209, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/media/Files/projects/testapp/env/src/django/django/utils/translation/trans_real.py", line 189, in _fetch
    "The translation infrastructure cannot be initialized before the "
django.core.exceptions.AppRegistryNotReady: The translation infrastructure cannot be initialized before the apps registry is ready. Check that you don't make non-lazy gettext calls at import time.
@AndrewSmiley
Copy link

I updated my wsgi.py file from

from django.core.handlers.wsgi import WSGIHandler
application = WSGIHandler()

to

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants