Bug 1910416
Summary: | Stack update reports failure even though everything is o.k. due to encoding issue - UnicodeEncodeError: 'latin-1' codec can't encode character '\u2192' in position 1702: ordinal not in range(256) | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Andreas Karis <akaris> |
Component: | python-tripleoclient | Assignee: | RHOS Maint <rhos-maint> |
Status: | CLOSED NOTABUG | QA Contact: | David Rosenfeld <drosenfe> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 16.1 (Train) | CC: | aschultz, chhuang, gkadam, hbrock, jslagle, kecarter, mburns |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-02-17 16:07:10 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andreas Karis
2020-12-23 19:43:00 UTC
This issue stems from the use of LC_CTYPE=latin-1 instead of a utf8 lang time (e.g. en_US.UTF-8). $ LC_CTYPE=latin-1 python3 Python 3.6.8 (default, Oct 8 2019, 16:29:04) [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> s = "\u2192" >>> print(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode character '\u2192' in position 0: ordinal not in range(128) >>> LC_CTYPE=en_US.UTF-8 python3 Python 3.6.8 (default, Oct 8 2019, 16:29:04) [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> s = "\u2192" >>> print(s) → >>> This will likely lead to other failures in system output. I would recommend ensuring the host system is configured to use UTF-8 rather than latin-1. For the record if you use en_US and not en_US.UTF-8, you can also get this error. [root@undercloud ~]# localectl System Locale: LANG=en_US VC Keymap: n/a X11 Layout: n/a Should be [root@undercloud ~]# localectl System Locale: LANG=en_US.UTF-8 VC Keymap: us X11 Layout: n/a |