do-release-upgrade -d fails with 12.04: fatal error occurred in DistUpgrade/DistUpgradeView.py

Bug #1167158 reported by Sundberg Pauli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager-core (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

root@XXX-office-antec:/home/XXX# do-release-upgrade -d
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1197 kB]
Fetched 1197 kB in 0s (0 B/s)
authenticate 'raring.tar.gz' against 'raring.tar.gz.gpg'
extracting 'raring.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Hit http://security.ubuntu.com quantal-security Release.gpg
Hit http://se.archive.ubuntu.com quantal Release.gpg
Hit http://security.ubuntu.com quantal-security Release
Hit http://se.archive.ubuntu.com quantal-updates Release.gpg
Hit http://ppa.launchpad.net quantal Release.gpg
Hit http://extras.ubuntu.com quantal Release.gpg
Hit http://se.archive.ubuntu.com quantal Release
Hit http://security.ubuntu.com quantal-security/main Sources
Hit http://se.archive.ubuntu.com quantal-updates Release
Hit http://ppa.launchpad.net quantal Release
Hit http://extras.ubuntu.com quantal Release
Hit http://se.archive.ubuntu.com quantal/main Sources
Hit http://security.ubuntu.com quantal-security/restricted Sources
Hit http://se.archive.ubuntu.com quantal/restricted Sources
Hit http://ppa.launchpad.net quantal/main Sources
Hit http://extras.ubuntu.com quantal/main Sources
Hit http://se.archive.ubuntu.com quantal/universe Sources
Hit http://security.ubuntu.com quantal-security/universe Sources
Hit http://se.archive.ubuntu.com quantal/multiverse Sources
Hit http://ppa.launchpad.net quantal/main amd64 Packages
Hit http://extras.ubuntu.com quantal/main amd64 Packages
Hit http://se.archive.ubuntu.com quantal/main amd64 Packages
Hit http://security.ubuntu.com quantal-security/multiverse Sources
Hit http://ppa.launchpad.net quantal/main i386 Packages
Hit http://se.archive.ubuntu.com quantal/restricted amd64 Packages
Hit http://extras.ubuntu.com quantal/main i386 Packages
Hit http://se.archive.ubuntu.com quantal/universe amd64 Packages
Hit http://security.ubuntu.com quantal-security/main amd64 Packages
Err http://ppa.launchpad.net quantal/main Translation-en

Err http://extras.ubuntu.com quantal/main Translation-en

Hit http://se.archive.ubuntu.com quantal/multiverse amd64 Packages
Hit http://se.archive.ubuntu.com quantal/main i386 Packages
Hit http://security.ubuntu.com quantal-security/restricted amd64 Packages
Err http://ppa.launchpad.net quantal/main Translation-en

Err http://extras.ubuntu.com quantal/main Translation-en

Hit http://se.archive.ubuntu.com quantal/restricted i386 Packages
Hit http://archive.canonical.com quantal Release.gpg
Hit http://security.ubuntu.com quantal-security/universe amd64 Packages
Hit http://se.archive.ubuntu.com quantal/universe i386 Packages
Err http://ppa.launchpad.net quantal/main Translation-en

Err http://extras.ubuntu.com quantal/main Translation-en

Hit http://se.archive.ubuntu.com quantal/multiverse i386 Packages
Hit http://security.ubuntu.com quantal-security/multiverse amd64 Packages
Err http://ppa.launchpad.net quantal/main Translation-en

Err http://extras.ubuntu.com quantal/main Translation-en

Hit http://security.ubuntu.com quantal-security/main i386 Packages
Ign http://ppa.launchpad.net quantal/main Translation-en
Ign http://extras.ubuntu.com quantal/main Translation-en
Hit http://se.archive.ubuntu.com quantal/main Translation-en
Hit http://se.archive.ubuntu.com quantal/multiverse Translation-en
Hit http://security.ubuntu.com quantal-security/restricted i386 Packages
Hit http://se.archive.ubuntu.com quantal/restricted Translation-en
Hit http://security.ubuntu.com quantal-security/universe i386 Packages
Hit http://se.archive.ubuntu.com quantal/universe Translation-en
Hit http://archive.canonical.com quantal Release
Hit http://se.archive.ubuntu.com quantal-updates/main Sources
Hit http://security.ubuntu.com quantal-security/multiverse i386 Packages
Hit http://se.archive.ubuntu.com quantal-updates/restricted Sources
Hit http://se.archive.ubuntu.com quantal-updates/universe Sources
Hit http://security.ubuntu.com quantal-security/main Translation-en
Hit http://se.archive.ubuntu.com quantal-updates/multiverse Sources
Hit http://se.archive.ubuntu.com quantal-updates/main amd64 Packages
Hit http://se.archive.ubuntu.com quantal-updates/restricted amd64 Packages
Hit http://se.archive.ubuntu.com quantal-updates/universe amd64 Packages
Hit http://se.archive.ubuntu.com quantal-updates/multiverse amd64 Packages
Hit http://security.ubuntu.com quantal-security/multiverse Translation-en
Hit http://archive.canonical.com quantal/partner Sources
Hit http://se.archive.ubuntu.com quantal-updates/main i386 Packages
Hit http://se.archive.ubuntu.com quantal-updates/restricted i386 Packages
Hit http://security.ubuntu.com quantal-security/restricted Translation-en
Hit http://se.archive.ubuntu.com quantal-updates/universe i386 Packages
Hit http://se.archive.ubuntu.com quantal-updates/multiverse i386 Packages
Hit http://security.ubuntu.com quantal-security/universe Translation-en
Hit http://se.archive.ubuntu.com quantal-updates/main Translation-en
Hit http://se.archive.ubuntu.com quantal-updates/multiverse Translation-en
Hit http://se.archive.ubuntu.com quantal-updates/restricted Translation-en
Hit http://archive.canonical.com quantal/partner amd64 Packages
Hit http://se.archive.ubuntu.com quantal-updates/universe Translation-en
Hit http://archive.canonical.com quantal/partner i386 Packages
Err http://archive.canonical.com quantal/partner Translation-en

Err http://archive.canonical.com quantal/partner Translation-en

Err http://archive.canonical.com quantal/partner Translation-en

Err http://archive.canonical.com quantal/partner Translation-en

Ign http://archive.canonical.com quantal/partner Translation-en
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Updating repository information
WARNING: Failed to read mirror file

Third party sources disabled

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.

To continue please press [ENTER]

A fatal error occurred

Please report this as a bug and include the files
/var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
your report. The upgrade has aborted.
Your original sources.list was saved in
/etc/apt/sources.list.distUpgrade.

Traceback (most recent call last):

File "/tmp/ubuntu-release-upgrader-vphvs6/raring", line 10, in
<module>
sys.exit(main())

File
"/tmp/ubuntu-release-upgrader-vphvs6/DistUpgrade/DistUpgradeMain.py",
line 240, in main
if app.run():

File
"/tmp/ubuntu-release-upgrader-vphvs6/DistUpgrade/DistUpgradeController.py",
line 1771, in run
return self.fullUpgrade()

File
"/tmp/ubuntu-release-upgrader-vphvs6/DistUpgrade/DistUpgradeController.py",
line 1670, in fullUpgrade
if not self.updateSourcesList():

File
"/tmp/ubuntu-release-upgrader-vphvs6/DistUpgrade/DistUpgradeController.py",
line 818, in updateSourcesList
_("Some third party entries in your sources.list "

File
"/tmp/ubuntu-release-upgrader-vphvs6/DistUpgrade/DistUpgradeViewText.py",
line 138, in information
sys.stdin.readline().decode(ENCODING, "backslashreplace")

TypeError: decode() argument 1 must be string, not None

Then i re runned it:
[clip clip clip, everything is fine ]
File
"/tmp/ubuntu-release-upgrader-q4zsrg/DistUpgrade/DistUpgradeView.py",
line 384, in confirmChanges
downloadSizeStr = downloadSizeStr.decode(ENCODING)

TypeError: decode() argument 1 must be string, not None

root@XXX-office-antec:/home/XXX# nano /tmp/ubuntu-release-upgrader-q4zsrg/DistUpgrade/DistUpgradeView.py
root@XXX-office-antec:/home/XXX# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

Revision history for this message
Sundberg Pauli (susundberg) wrote :
Revision history for this message
Sundberg Pauli (susundberg) wrote :
Revision history for this message
Sundberg Pauli (susundberg) wrote :

Bit debugging with python and my locale, shows that my locale / python is broken, not the script (that might do some counter measures / pre-check ?):

XXX@XXX-office-antec ~
 % cat silly.py
import locale

print "Hello there"
print locale.getdefaultlocale()

locale.setlocale(locale.LC_ALL, "")
print locale.getdefaultlocale()

XXX@XXX-office-antec ~
 % locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

XXX@XXX-office-antec ~
 % python silly.py
Hello there
(None, None)
(None, None)

XXX@XXX-office-antec ~
 % export LANGUAGE=en_US.UTF-8
XXX@XXX-office-antec ~
 % python silly.py
Hello there
(None, None)
(None, None)

XXX@XXX-office-antec ~
 % export LC_ALL=en_US.UTF-8
XXX@XXX-office-antec ~
 % python silly.py
Hello there
('en_US', 'UTF-8')
('en_US', 'UTF-8')

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager-core (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

This was fixed shortly after it this bug was reported.

ubuntu-release-upgrader (1:0.192.8) raring; urgency=low

  * fallback to UTF-8 if getdefaultlocale returns None (LP: #1166346)

 -- Brian Murray <email address hidden> Wed, 10 Apr 2013 10:49:50 -0700

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.