[openstack-dev] [horizon] flavors test problem in Jenkins

Akihiro MOTOKI motoki at da.jp.nec.com
Fri Feb 15 19:20:21 UTC 2013


You need to add the following to define _.
from django.utils.translation import ugettext as _

(2013/02/16 2:22), Kuang-Ching Wang wrote:
> Hi,
>
> I am seeing the following errors when Jenkins is testing my code.  The code runs fine locally, so I suppose is some dependency issue when done in Jenkins.  My code has form fields defined with label _("Name") ...
>
>
>
> ......
> 2013-02-15 04:47:56.458 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/dashboards/project/loadbalancers/workflows.py", line 30, in <module>
> 2013-02-15 04:47:56.458 |     class AddPoolAction(workflows.Action):
> 2013-02-15 04:47:56.459 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/dashboards/project/loadbalancers/workflows.py", line 31, in AddPoolAction
> 2013-02-15 04:47:56.459 |     name = forms.CharField(max_length=80, label=_("Name"))
> 2013-02-15 04:47:56.459 | NameError: name '_' is not defined
> 2013-02-15 04:47:56.665 | E....EEEEEEEEEEEEEEEEEEEEEEEEEEEE.Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
> 2013-02-15 04:47:56.665 | Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
> 2013-02-15 04:47:56.679 | Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
> 2013-02-15 04:47:56.693 | Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
> 2013-02-15 04:47:56.694 | .S
> 2013-02-15 04:47:56.695 | ======================================================================
> 2013-02-15 04:47:56.695 | ERROR: test_extra_create_get (openstack_dashboard.dashboards.admin.flavors.extras.tests.FlavorExtrasTests)
> 2013-02-15 04:47:56.695 | ----------------------------------------------------------------------
> 2013-02-15 04:47:56.696 | Traceback (most recent call last):
> 2013-02-15 04:47:56.696 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/test/helpers.py", line 74, in instance_stub_out
> 2013-02-15 04:47:56.696 |     return fn(self)
> 2013-02-15 04:47:56.696 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/dashboards/admin/flavors/extras/tests.py", line 54, in test_extra_create_get
> 2013-02-15 04:47:56.696 |     args=[flavor.id])
> 2013-02-15 04:47:56.697 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/core/urlresolvers.py", line 447, in reverse
> 2013-02-15 04:47:56.697 |     app_list = resolver.app_dict[ns]
> 2013-02-15 04:47:56.697 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/core/urlresolvers.py", line 290, in app_dict
> 2013-02-15 04:47:56.697 |     self._populate()
> 2013-02-15 04:47:56.697 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/core/urlresolvers.py", line 242, in _populate
> 2013-02-15 04:47:56.698 |     for pattern in reversed(self.url_patterns):
> 2013-02-15 04:47:56.698 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/core/urlresolvers.py", line 328, in url_patterns
> 2013-02-15 04:47:56.698 |     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
> 2013-02-15 04:47:56.698 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/core/urlresolvers.py", line 323, in urlconf_module
> 2013-02-15 04:47:56.698 |     self._urlconf_module = import_module(self.urlconf_name)
> 2013-02-15 04:47:56.699 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
> 2013-02-15 04:47:56.699 |     __import__(name)
> 2013-02-15 04:47:56.699 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/urls.py", line 36, in <module>
> 2013-02-15 04:47:56.699 |     url(r'', include(horizon.urls))
> 2013-02-15 04:47:56.700 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/conf/urls/__init__.py", line 25, in include
> 2013-02-15 04:47:56.700 |     patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)
> 2013-02-15 04:47:56.700 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/utils/functional.py", line 184, in inner
> 2013-02-15 04:47:56.700 |     self._setup()
> 2013-02-15 04:47:56.701 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/utils/functional.py", line 248, in _setup
> 2013-02-15 04:47:56.701 |     self._wrapped = self._setupfunc()
> 2013-02-15 04:47:56.701 |   File "/home/jenkins/workspace/gate-horizon-python26/horizon/base.py", line 715, in url_patterns
> 2013-02-15 04:47:56.701 |     return self._urls()[0]
> 2013-02-15 04:47:56.701 |   File "/home/jenkins/workspace/gate-horizon-python26/horizon/base.py", line 746, in _urls
> 2013-02-15 04:47:56.702 |     url(r'^%s/' % dash.slug, include(dash._decorated_urls)))
> 2013-02-15 04:47:56.702 |   File "/home/jenkins/workspace/gate-horizon-python26/horizon/base.py", line 456, in _decorated_urls
> 2013-02-15 04:47:56.702 |     url(r'^%s/' % panel.slug, include(panel._decorated_urls)))
> 2013-02-15 04:47:56.702 |   File "/home/jenkins/workspace/gate-horizon-python26/horizon/base.py", line 230, in _decorated_urls
> 2013-02-15 04:47:56.702 |     urlpatterns = self._get_default_urlpatterns()
> 2013-02-15 04:47:56.702 |   File "/home/jenkins/workspace/gate-horizon-python26/horizon/base.py", line 83, in _get_default_urlpatterns
> 2013-02-15 04:47:56.703 |     urls_mod = import_module('.urls', package_string)
> 2013-02-15 04:47:56.703 |   File "/home/jenkins/workspace/gate-horizon-python26/.tox/py26/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
> 2013-02-15 04:47:56.703 |     __import__(name)
> 2013-02-15 04:47:56.703 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/dashboards/project/loadbalancers/urls.py", line 19, in <module>
> 2013-02-15 04:47:56.703 |     from .views import IndexView
> 2013-02-15 04:47:56.704 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/dashboards/project/loadbalancers/views.py", line 29, in <module>
> 2013-02-15 04:47:56.704 |     from .workflows import AddPool, AddMember, AddMonitor, AddVip
> 2013-02-15 04:47:56.704 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/dashboards/project/loadbalancers/workflows.py", line 30, in <module>
> 2013-02-15 04:47:56.704 |     class AddPoolAction(workflows.Action):
> 2013-02-15 04:47:56.704 |   File "/home/jenkins/workspace/gate-horizon-python26/openstack_dashboard/dashboards/project/loadbalancers/workflows.py", line 31, in AddPoolAction
> 2013-02-15 04:47:56.705 |     name = forms.CharField(max_length=80, label=_("Name"))
> 2013-02-15 04:47:56.705 | NameError: name '_' is not defined
>
>
> --
> Kuang-Ching (KC) Wang
> Member of Technical Staff -- Big Switch Networks -- http://www.bigswitch.com/
>
>
>
>
>
>
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130216/bab68608/attachment.html>


More information about the OpenStack-dev mailing list