Unit test failure: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.

Bug #1273301 reported by Anita Kuno
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Ilya Pekelny
oslo-incubator
Fix Released
Undecided
Ilya Pekelny

Bug Description

FAIL: neutron.tests.unit.test_neutron_manager.NeutronManagerTestCase.test_multiple_plugins_specified_for_service_type
tags: worker-3
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
2014-01-17 09:03:30,605 INFO [neutron.manager] Loading core plugin: neutron.db.db_base_plugin_v2.NeutronDbPluginV2
2014-01-17 09:03:30,698 INFO [neutron.manager] Loading Plugin: neutron.tests.unit.dummy_plugin.DummyServicePlugin
2014-01-17 09:03:30,698 INFO [neutron.manager] Loading Plugin: neutron.tests.unit.dummy_plugin.DummyServicePlugin
}}}

Traceback (most recent call last):
  File "neutron/tests/unit/test_neutron_manager.py", line 100, in test_multiple_plugins_specified_for_service_type
    NeutronManager.get_instance()
  File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 866, in __exit__
    mismatch = matcher.match((exc_type, exc_value, traceback))
  File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 64, in match
    return self.value_re.match(other[1])
  File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 206, in match
    after = self.preprocessor(value)
  File "neutron/openstack/common/gettextutils.py", line 264, in __str__
    raise UnicodeError(msg)
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
Anita Kuno (anteaya) wrote :

logstash fingerprint:
message: "Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead." AND filename:"console.html" AND (build_name:"gate-neutron-python26" OR build_name:"gate-neutron-python27")
http://bit.ly/1esqm1A

Ilya Pekelny (i159)
Changed in oslo:
status: New → In Progress
assignee: nobody → Ilya Pekelny (i159)
Ilya Pekelny (i159)
Changed in keystone:
status: New → In Progress
assignee: nobody → Ilya Pekelny (i159)
Ilya Pekelny (i159)
Changed in oslo:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

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

Reviewed: https://review.openstack.org/74983
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=1cd779ed72d6ebce4b72b486ee1c1f0c38ade459
Submitter: Jenkins
Branch: master

commit 1cd779ed72d6ebce4b72b486ee1c1f0c38ade459
Author: Ilya Pekelny <email address hidden>
Date: Thu Feb 20 10:32:48 2014 +0200

    Sync db.exception from Oslo

    Change-Id: I7ff5e8920a84b1c3cc59278fb6e21b6bf2913733
    Closes-Bug: #1273301

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/70696
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=29d9c270d4e3dde044e8d27d888455e423c31b20
Submitter: Jenkins
Branch: master

commit 29d9c270d4e3dde044e8d27d888455e423c31b20
Author: Ilya Pekelny <email address hidden>
Date: Mon Feb 3 12:44:35 2014 +0200

    Handle exception messages with six.text_type

    Handle exception messages with six.text_type instead of using
    `str`. This is required to prevent of entering bytes to a database and
    prevent unexpected behavior of database and database driver.

    Change-Id: Idb54ee271cfb09e8523e357674b598b11704742c
    Closes-Bug: #1273301

Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-3 → 2014.1
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-3 → 2014.1
no longer affects: neutron
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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