__str__ causes a UnicodeError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.i18n |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hello,
I have upgraded my OpenStack deployment from Juno to Kilo, the following issue was found.
The packages I have.
[root@controller1 ~]# rpm -qa | grep -i cinder
openstack-
python-
python-
Here is a snippet where the problem occurs.
if six.PY2:
def __str__(self):
# NOTE(luisg): Logging in python 2.6 tries to str() log records,
# and it expects specifically a UnicodeError in order to proceed.
from oslo_i18n._i18n import _
msg = _('Message objects do not support str() because they may '
raise UnicodeError(msg)
Issue is here: /usr/lib/
UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.
From log file /var/log/
2015-06-03 14:00:01.483 7521 CRITICAL cinder [req-d73048bd-
2015-06-03 14:00:01.483 7521 TRACE cinder Traceback (most recent call last):
2015-06-03 14:00:01.483 7521 TRACE cinder File "/bin/cinder-
2015-06-03 14:00:01.483 7521 TRACE cinder sys.exit(main())
2015-06-03 14:00:01.483 7521 TRACE cinder File "/usr/lib/
2015-06-03 14:00:01.483 7521 TRACE cinder print(_("Starting volume usage audit"))
2015-06-03 14:00:01.483 7521 TRACE cinder File "/usr/lib/
2015-06-03 14:00:01.483 7521 TRACE cinder raise UnicodeError(msg)
2015-06-03 14:00:01.483 7521 TRACE cinder UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.
2015-06-03 14:00:01.483 7521 TRACE cinder
What would be causing this issue?
I have disable cinder v1 API in the configuration and also changed all the endpoints to use v2.
Best regards
Changed in oslo.i18n: | |
status: | New → Invalid |
Maybe this should be reported to Cinder? My bad.