UnicodeDecodeError occurs when stack-create with non-exist linuxdistribution in non-english environment

Bug #1249233 reported by Chen Xiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
Fix Released
High
Chen Xiao

Bug Description

In Japanese language environment
heat stack-create teststack -f WordPress_Single_Instance.template -P "intsancetype=m1.small;DBUsername=wp;DBPassword=verybadpassword;KeyName=heat_key;LinuxDistribution=F10"
when F10 is not exist, the error is follow

Traceback (most recent call last):
  File "/usr/bin/heat", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/heatclient/shell.py", line 355, in main
    print >> sys.stderr, e
UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-15: ordinal not in range(128)

I see when F10 is exist, but the image name it used is not exist, can display the same error.

Chen Xiao (chenxiao)
Changed in python-heatclient:
assignee: nobody → Chen Xiao (chenxiao)
description: updated
Changed in python-heatclient:
status: New → Triaged
importance: Undecided → High
milestone: none → v0.2.6
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

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

Changed in python-heatclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/55984
Committed: http://github.com/openstack/python-heatclient/commit/2742b330102f9135cefa17294bc7ac6e0618dcd5
Submitter: Jenkins
Branch: master

commit 2742b330102f9135cefa17294bc7ac6e0618dcd5
Author: chenxiao <email address hidden>
Date: Tue Nov 12 15:58:37 2013 +0800

    Encode output for fixing UnicodeDecodeError

    Current heatclient doesn't handle properly outgoing encode process.
    For resolving it, this patch implements a process to encode everything
    going out of the client, for example, prints.

    This patch used two new modules (gettextutils.py and strutils.py)
    taken from oslo-incubator in order to use safe_encode() and
    safe_decode().

    Closes-Bug: #1249233

    Change-Id: Ia8c955a80d68126cd9c1fd791bda3e331a2aa5c9

Changed in python-heatclient:
status: In Progress → Fix Committed
Changed in python-heatclient:
status: Fix Committed → Fix Released
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.