Fail py27 job Message objects do not support str()

Bug #1494854 reported by Sergey Kraynev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Oleksii Chuprykov

Bug Description

Fail on our gate job:
http://logs.openstack.org/07/222607/1/gate/gate-heat-python27/9333fc3/console.html

2015-09-11 15:50:54.656 | if [ "$START_AT" = "." ]; then for plugin in $START_AT/contrib/*; do ${PYTHON} -m subunit.run discover -s $plugin --list ; done; fi
2015-09-11 15:50:54.656 | --- import errors ---
2015-09-11 15:50:54.656 | Failed to import test module: heat.tests.autoscaling.test_scaling_group
2015-09-11 15:50:54.656 | Traceback (most recent call last):
2015-09-11 15:50:54.656 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
2015-09-11 15:50:54.656 | module = self._get_module_from_name(name)
2015-09-11 15:50:54.657 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
2015-09-11 15:50:54.657 | __import__(name)
2015-09-11 15:50:54.657 | File "heat/tests/autoscaling/test_scaling_group.py", line 28, in <module>
2015-09-11 15:50:54.657 | from heat.tests.nova import fakes as fakes_nova
2015-09-11 15:50:54.657 | File "heat/tests/nova/fakes.py", line 29, in <module>
2015-09-11 15:50:54.657 | Client = base_client.get_client_class(NOVACLIENT_VERSION)
2015-09-11 15:50:54.657 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/novaclient/client.py", line 784, in get_client_class
2015-09-11 15:50:54.657 | warnings.warn(_LW("'get_client_class' is deprecated. "
2015-09-11 15:50:54.657 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/lib/python2.7/warnings.py", line 29, in _show_warning
2015-09-11 15:50:54.657 | file.write(formatwarning(message, category, filename, lineno, line))
2015-09-11 15:50:54.657 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/lib/python2.7/warnings.py", line 38, in formatwarning
2015-09-11 15:50:54.658 | s = "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message)
2015-09-11 15:50:54.658 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/oslo_i18n/_message.py", line 223, in __str__
2015-09-11 15:50:54.658 | raise UnicodeError(msg)
2015-09-11 15:50:54.658 | UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.
2015-09-11 15:50:54.658 | Failed to import test module: rackspace.tests.test_rackspace_cloud_server
2015-09-11 15:50:54.658 | Traceback (most recent call last):
2015-09-11 15:50:54.658 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
2015-09-11 15:50:54.658 | module = self._get_module_from_name(name)
2015-09-11 15:50:54.658 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
2015-09-11 15:50:54.658 | __import__(name)
2015-09-11 15:50:54.659 | File "/home/jenkins/workspace/gate-heat-python27/contrib/rackspace/rackspace/tests/test_rackspace_cloud_server.py", line 28, in <module>
2015-09-11 15:50:54.659 | from heat.tests.nova import fakes
2015-09-11 15:50:54.659 | File "heat/tests/nova/fakes.py", line 29, in <module>
2015-09-11 15:50:54.659 | Client = base_client.get_client_class(NOVACLIENT_VERSION)
2015-09-11 15:50:54.659 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/novaclient/client.py", line 784, in get_client_class
2015-09-11 15:50:54.659 | warnings.warn(_LW("'get_client_class' is deprecated. "
2015-09-11 15:50:54.659 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/lib/python2.7/warnings.py", line 29, in _show_warning
2015-09-11 15:50:54.659 | file.write(formatwarning(message, category, filename, lineno, line))
2015-09-11 15:50:54.659 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/lib/python2.7/warnings.py", line 38, in formatwarning
2015-09-11 15:50:54.659 | s = "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message)
2015-09-11 15:50:54.659 | File "/home/jenkins/workspace/gate-heat-python27/.tox/py27/local/lib/python2.7/site-packages/oslo_i18n/_message.py", line 223, in __str__
2015-09-11 15:50:54.659 | raise UnicodeError(msg)
2015-09-11 15:50:54.660 | UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/222855

Changed in heat:
assignee: nobody → Oleksii Chuprykov (ochuprykov)
status: New → In Progress
Revision history for this message
Oleksii Chuprykov (ochuprykov) wrote :

Seems the problem here https://github.com/openstack/python-novaclient/blob/master/novaclient/client.py#L784 . We shouldn't use _LW inside warnings.warn()

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/222855
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=8e1192172867cd7e6e946fb4d5e53658c24a1b09
Submitter: Jenkins
Branch: master

commit 8e1192172867cd7e6e946fb4d5e53658c24a1b09
Author: Oleksii Chuprykov <email address hidden>
Date: Sat Sep 12 11:01:00 2015 +0300

    Use Class method instead of deprecated method

    Nova get_client_class is deprecated now. Also we have
    problems with formatting deprecation messages.

    Change-Id: I7ff2533976dcba1bdabc1537ce444e886d2ff206
    Closes-Bug: #1494854

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-rc1 → 5.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.