do-release-upgrade doesn't work with C locale

Bug #1796840 reported by yvs
8
This bug affects 1 person
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/do-release-upgrade", line 121, in <module>
    print(_("Checking for a new Ubuntu release"))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-12: ordinal not in range(128)

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: ubuntu-release-upgrader-core 1:18.10.10
ProcVersionSignature: Ubuntu 4.15.0-34.37-generic 4.15.18
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)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: Upgraded to cosmic on 2018-10-08 (0 days ago)

Revision history for this message
yvs (lrou2014) wrote :
tags: added: bionic2cosmic
Revision history for this message
Juhani Numminen (jsonic) wrote :

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 ...

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.