do-release-upgrade doesn't work with C locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
How to repeat:
% LANG=C do-release-upgrade ~
Traceback (most recent call last):
File "/usr/bin/
print(
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-12: ordinal not in range(128)
ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: ubuntu-
ProcVersionSign
Uname: Linux 4.15.0-34-generic x86_64
ApportVersion: 2.20.10-0ubuntu11
Architecture: amd64
CrashDB: ubuntu
Date: Tue Oct 9 12:14:04 2018
InstallationDate: Installed on 2014-01-10 (1732 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
PackageArchitec
SourcePackage: ubuntu-
Symptom: ubuntu-
UpgradeStatus: Upgraded to cosmic on 2018-10-08 (0 days ago)
tags: | added: bionic2cosmic |
Isn't that a known problem with Python?
A workaround might be to use the C.UTF-8 locale instead of C.
From https:/ /www.python. org/dev/ peps/pep- 0538/
> The simplest way to deal with this problem for currently released versions of CPython is to explicitly set a more sensible locale when launching the application. For example:
>
> LC_CTYPE=C.UTF-8 python3 ...