ubuntu-release-upgrader crashes with DistUpgrade/sourceslist.py", line 416, in save : UnicodeEncodeError: 'ascii' codec can't encode characters in position 97-114: ordinal not in range(128)

Bug #1278280 reported by 蒋卓玮
60
This bug affects 12 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
In Progress
High
Michael Vogt
Trusty
In Progress
High
Michael Vogt

Bug Description

Errors bucket: https://errors.ubuntu.com/problem/1d7beca9c37b1f8277e5584cb4f844293e56afc5

部分升级错误

ProblemType: BugDistroRelease: Ubuntu 14.04
Package: ubuntu-release-upgrader-core 1:0.210
Uname: Linux 3.14.0-031400rc1-lowlatency x86_64
ApportVersion: 2.13.2-0ubuntu2
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: Unity
Date: Mon Feb 10 13:38:40 2014
InstallationDate: Installed on 2013-09-13 (150 days ago)
InstallationMedia: UbuntuKylin 13.10 "Saucy Salamander" - Alpha amd64 (20130724)
PackageArchitecture: allSourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to trusty on 2013-11-02 (99 days ago)
VarLogDistupgradeTermlog:

Related branches

Revision history for this message
蒋卓玮 (xiaoweialex) wrote :
summary: - can not upgrade
+ ubuntu-release-upgrader crashes with DistUpgrade/sourceslist.py", line
+ 416, in save : UnicodeEncodeError: 'ascii' codec can't encode characters
+ in position 97-114: ordinal not in range(128)
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Aurélien COUDERC (coucouf) wrote :

Yes, this happens when there are non-ascii character in one of the apt sources files.

…which must be very common because the disabled sources comment added by the release upgrade process is localized !

For example in French, the following was added to all my sources.list.d/*.list.distUpgrade during former upgrades :
désactivé pour la mise à niveau vers raring désactivé pour la mise à niveau vers saucy
(which translates to something like « disable for raring uprgade disabled for saucy upgrade »)

This gives us a clue that this bug is a regression from the Trusty cycle.
The raring -> saucy upgrade did work eventhough there were already non-ascii characters in sources files.

description: updated
Revision history for this message
Thomas (steffens12345) wrote :

may be, it is the same problem as
https://bugs.launchpad.net/bugs/1251588

if you like, try the solution, may be it works

Thomas

Revision history for this message
Brian Murray (brian-murray) wrote :

That's not a really good work around as the release upgrader has lots of logic to ensure upgrades go smoothly.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:0.217

---------------
ubuntu-release-upgrader (1:0.217) trusty; urgency=medium

  * debian/91-release-upgrade: if using the development release don't check
    for a new release.
  * include new version of python-apt's sourceslist.py (LP: #1278280)
 -- Brian Murray <email address hidden> Mon, 17 Mar 2014 16:30:41 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded a new version of the release-upgrader and would appreciate it if people could test the upgrade again.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Sérgio Faria (sergio91pt) wrote :

Doesn't work. I attempted a saucy to trusty upgrade using trusty's ubuntu-release-upgrader 1:0.219.2 and update-manager 1:0.196.9

File "/tmp/ubuntu-release-upgrader-ttg_o_/DistUpgrade/sourceslist.py", line 416, in save
    files[source.file].write(source.str())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 92: ordinal not in range(128)

Revision history for this message
Steffen Sindzinski (stesind) wrote :

No solution so far? I deleted all files in /etc/apt/sources.list.d/ but still same. In sources.list is just the standard stuff. Nothing with unicode.

Revision history for this message
Jan-Philipp Litza (jplitza) wrote :

The obvious workaround is to launch the upgrade with
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 update-manager -d

Still should be fixed (obviously).

Revision history for this message
Sérgio Faria (sergio91pt) wrote : Re: [Bug 1278280] Re: ubuntu-release-upgrader crashes with DistUpgrade/sourceslist.py", line 416, in save : UnicodeEncodeError: 'ascii' codec can't encode characters in position 97-114: ordinal not in range(128)

Jan-Phillipp, that doesn't work. Same problem as before. Although the UI is
in English, console output is still localized.
I also used a script to remove all non ASCII characters from apt.d, so I'm
not user where the 'ã' is coming from.

2014-04-04 17:51 GMT+01:00 Jan-Philipp Litza <email address hidden>:

> The obvious workaround is to launch the upgrade with
> LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 update-manager -d
>
> Still should be fixed (obviously).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1278280
>
> Title:
> ubuntu-release-upgrader crashes with DistUpgrade/sourceslist.py", line
> 416, in save : UnicodeEncodeError: 'ascii' codec can't encode
> characters in position 97-114: ordinal not in range(128)
>
> Status in “ubuntu-release-upgrader” package in Ubuntu:
> Triaged
>
> Bug description:
> Errors bucket:
>
> https://errors.ubuntu.com/problem/1d7beca9c37b1f8277e5584cb4f844293e56afc5
>
> 部分升级错误
>
> ProblemType: BugDistroRelease: Ubuntu 14.04
> Package: ubuntu-release-upgrader-core 1:0.210
> Uname: Linux 3.14.0-031400rc1-lowlatency x86_64
> ApportVersion: 2.13.2-0ubuntu2
> Architecture: amd64
> CrashDB: ubuntu
> CurrentDesktop: Unity
> Date: Mon Feb 10 13:38:40 2014
> InstallationDate: Installed on 2013-09-13 (150 days ago)
> InstallationMedia: UbuntuKylin 13.10 "Saucy Salamander" - Alpha amd64
> (20130724)
> PackageArchitecture: allSourcePackage: ubuntu-release-upgrader
> UpgradeStatus: Upgraded to trusty on 2013-11-02 (99 days ago)
> VarLogDistupgradeTermlog:
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1278280/+subscriptions
>

Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → In Progress
status: In Progress → Confirmed
Michael Vogt (mvo)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → In Progress
Changed in ubuntu-release-upgrader (Ubuntu Trusty):
assignee: nobody → Michael Vogt (mvo)
Revision history for this message
Arul (alarulrajan) wrote :

I have the same issue when i try to upgrade to 16.04 from 15.10 of UbuntuGNome

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.