[PKG-Openstack-devel] Issue with django 1.7?

Alberto Molina Coballes alb.molina at gmail.com
Wed Oct 15 07:54:47 UTC 2014


Hi,

After a new Icehouse installation on Debian Jessie everything is working
properly from command line interface but horizon is showing a 500 internal
server error.

Apache error logs shows:

[Wed Oct 15 09:09:50.745494 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318] Traceback (most recent call
last):
[Wed Oct 15 09:09:50.745512 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 168,
in __call__
[Wed Oct 15 09:09:50.745536 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     self.load_middleware()
[Wed Oct 15 09:09:50.745548 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 46,
in load_middleware
[Wed Oct 15 09:09:50.745568 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     mw_instance = mw_class()
[Wed Oct 15 09:09:50.745580 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/middleware/locale.py", line 23, in
__init__
[Wed Oct 15 09:09:50.745598 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     for url_pattern in
get_resolver(None).url_patterns:
[Wed Oct 15 09:09:50.745610 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 367,
in url_patterns
[Wed Oct 15 09:09:50.745632 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     patterns =
getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Wed Oct 15 09:09:50.745644 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 361,
in urlconf_module
[Wed Oct 15 09:09:50.745673 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     self._urlconf_module =
import_module(self.urlconf_name)
[Wed Oct 15 09:09:50.745685 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Wed Oct 15 09:09:50.745704 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     __import__(name)
[Wed Oct 15 09:09:50.745715 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/urls.py",
line 38, in <module>
[Wed Oct 15 09:09:50.745734 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     url(r'',
include(horizon.urls))
[Wed Oct 15 09:09:50.745745 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 29,
in include
[Wed Oct 15 09:09:50.745764 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     patterns =
getattr(urlconf_module, 'urlpatterns', urlconf_module)
[Wed Oct 15 09:09:50.745775 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 224, in
inner
[Wed Oct 15 09:09:50.745793 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     self._setup()
[Wed Oct 15 09:09:50.745804 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 357, in
_setup
[Wed Oct 15 09:09:50.745822 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     self._wrapped =
self._setupfunc()
[Wed Oct 15 09:09:50.745833 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/horizon/base.py", line 733, in
url_patterns
[Wed Oct 15 09:09:50.745852 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     return self._urls()[0]
[Wed Oct 15 09:09:50.745863 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/horizon/base.py", line 767, in _urls
[Wed Oct 15 09:09:50.745881 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     url(r'^%s/' % dash.slug,
include(dash._decorated_urls)))
[Wed Oct 15 09:09:50.745893 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/horizon/base.py", line 464, in
_decorated_urls
[Wed Oct 15 09:09:50.745911 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     url(r'^%s/' % url_slug,
include(panel._decorated_urls)))
[Wed Oct 15 09:09:50.745922 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/horizon/base.py", line 234, in
_decorated_urls
[Wed Oct 15 09:09:50.745940 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     urlpatterns =
self._get_default_urlpatterns()
[Wed Oct 15 09:09:50.745952 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/horizon/base.py", line 87, in
_get_default_urlpatterns
[Wed Oct 15 09:09:50.745970 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     urls_mod =
import_module('.urls', package_string)
[Wed Oct 15 09:09:50.745981 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line 46, in
import_module
[Wed Oct 15 09:09:50.745999 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     __import__(name)
[Wed Oct 15 09:09:50.746011 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/flavors/urls.py",
line 25, in <module>
[Wed Oct 15 09:09:50.746037 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     from
openstack_dashboard.dashboards.admin.flavors.extras \\
[Wed Oct 15 09:09:50.746049 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/flavors/extras/urls.py",
line 24, in <module>
[Wed Oct 15 09:09:50.746069 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     from
openstack_dashboard.dashboards.admin.flavors.extras import views
[Wed Oct 15 09:09:50.746081 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/flavors/extras/views.py",
line 33, in <module>
[Wed Oct 15 09:09:50.746101 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     from
openstack_dashboard.dashboards.admin.flavors.extras \\
[Wed Oct 15 09:09:50.746112 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/flavors/extras/tables.py",
line 55, in <module>
[Wed Oct 15 09:09:50.746132 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     class
ExtraSpecsTable(tables.DataTable):
[Wed Oct 15 09:09:50.746143 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/horizon/tables/base.py", line 955, in
__new__
[Wed Oct 15 09:09:50.746162 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     attrs["_meta"] = opts =
DataTableOptions(attrs.get("Meta", None))
[Wed Oct 15 09:09:50.746174 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/horizon/tables/base.py", line 879, in
__init__
[Wed Oct 15 09:09:50.746192 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     verbose_name =
getattr(options, 'verbose_name', None) \\
[Wed Oct 15 09:09:50.746204 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 132, in
__wrapper__
[Wed Oct 15 09:09:50.746222 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     res = func(*self.__args,
**self.__kw)
[Wed Oct 15 09:09:50.746233 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/translation/__init__.py",
line 83, in ugettext
[Wed Oct 15 09:09:50.746251 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     return
_trans.ugettext(message)
[Wed Oct 15 09:09:50.746262 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/translation/trans_real.py",
line 325, in ugettext
[Wed Oct 15 09:09:50.746280 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     return
do_translate(message, 'ugettext')
[Wed Oct 15 09:09:50.746291 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/translation/trans_real.py",
line 306, in do_translate
[Wed Oct 15 09:09:50.746309 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     _default =
translation(settings.LANGUAGE_CODE)
[Wed Oct 15 09:09:50.746321 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/translation/trans_real.py",
line 209, in translation
[Wed Oct 15 09:09:50.746339 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     default_translation =
_fetch(settings.LANGUAGE_CODE)
[Wed Oct 15 09:09:50.746356 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]   File
"/usr/lib/python2.7/dist-packages/django/utils/translation/trans_real.py",
line 189, in _fetch
[Wed Oct 15 09:09:50.746375 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318]     "The translation
infrastructure cannot be initialized before the "
[Wed Oct 15 09:09:50.746393 2014] [wsgi:error] [pid 22423:tid
139766372157184] [client 172.22.7.152:43318] 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.

I think it may be related to django version because downgrading to django
1.4.5 (wheezy) solves it.

I'm not sure if it's a bug, so I asking to the list before.

Regards

Alberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/openstack-devel/attachments/20141015/17b18851/attachment.html>


More information about the Openstack-devel mailing list