UnicodeDecodeError in askYesNoQuestion of DistUpgradeViewText.py

Bug #1071388 reported by Brian Murray
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Unassigned
Quantal
Fix Released
High
Unassigned

Bug Description

[Impact]
People use languages where yes / no characters are unicode will not be able to upgrade in their language to Quantal.

[Test Case]
0) In /etc/update-manager/release-upgrades set Prompt=normal
1) On a precise system install Russian language
2) In a terminal run:
LANG=ru_RU.UTF-8 do-release-upgrade
3) When prompted with:
Продолжить [дН]
4) Respond with either character

With the original version of ubuntu-release-upgrader it will crash. With the version from quantal-proposed it will not crash. Remember to use the proposed version, as in step 2, of ubuntu-release-upgrader you will need to use:
do-release-upgrade -p

Original report:

In bug 1068389 a user thought they were experiencing the same bug as that one but it was in fact different. Their comment follows:

I jist run "do-release-upgrade" and wait until i see

Чтение временных файлов

Проверка менеджера пакетов

Продолжить работу через SSH?

Этот сеанс запущен через ssh. Не рекомендуется выполнять обновление
через ssh, так как в случае неудачи восстановление будет очень
сложным.

Если вы продолжите, дополнительная служба ssh будет запущена на порту
«1022».
Хотите ли вы продолжить?

Продолжить [дН]

and after that I enter letter "д" and it give me error:

Произошла критическая ошибка

Пожалуйста, сообщите об этой ошибке и включите файлы
/var/log/dist-upgrade/main.log и /var/log/dist-upgrade/apt.log в ваш
отчёт. Обновление было отменено.
Ваш оригинальный файл sources.list был сохранён в
/etc/apt/sources.list.distUpgrade.

Traceback (most recent call last):

File "/tmp/update-manager-sw_elb/quantal", line 10, in <module>
sys.exit(main())

File "/tmp/update-manager-sw_elb/DistUpgrade/DistUpgradeMain.py",
line 240, in main
if app.run():

File
"/tmp/update-manager-sw_elb/DistUpgrade/DistUpgradeController.py",
line 1764, in run
return self.fullUpgrade()

File
"/tmp/update-manager-sw_elb/DistUpgrade/DistUpgradeController.py",
line 1616, in fullUpgrade
if not self.prepare():

File
"/tmp/update-manager-sw_elb/DistUpgrade/DistUpgradeController.py",
line 429, in prepare
self._sshMagic()

File
"/tmp/update-manager-sw_elb/DistUpgrade/DistUpgradeController.py",
line 299, in _sshMagic
"Do you want to continue?") % port)

File "/tmp/update-manager-sw_elb/DistUpgrade/DistUpgradeViewText.py",
line 210, in askYesNoQuestion
if res.strip().lower().startswith(_("y")):

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position
0: ordinal not in range(128)

The same thing would likely happen if the responded No.

Related branches

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

The traceback from their main.log file is a bit easier to read:

Traceback (most recent call last):

  File "/tmp/update-manager-tp0AlE/quantal", line 10, in <module>
    sys.exit(main())

  File "/tmp/update-manager-tp0AlE/DistUpgrade/DistUpgradeMain.py", line 240, in main
    if app.run():

  File "/tmp/update-manager-tp0AlE/DistUpgrade/DistUpgradeController.py", line 1764, in run
    return self.fullUpgrade()

  File "/tmp/update-manager-tp0AlE/DistUpgrade/DistUpgradeController.py", line 1616, in fullUpgrade
    if not self.prepare():

  File "/tmp/update-manager-tp0AlE/DistUpgrade/DistUpgradeController.py", line 429, in prepare
    self._sshMagic()

  File "/tmp/update-manager-tp0AlE/DistUpgrade/DistUpgradeController.py", line 299, in _sshMagic
    "Do you want to continue?") % port)

  File "/tmp/update-manager-tp0AlE/DistUpgrade/DistUpgradeViewText.py", line 210, in askYesNoQuestion
    if res.strip().lower().startswith(_("y")):

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

tags: added: quantal
tags: added: dist-upgrade
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu Quantal):
status: New → Triaged
importance: Undecided → High
milestone: none → quantal-updates
Revision history for this message
Brian Murray (brian-murray) wrote :

And it happened with: LANG=ru_RU.UTF-8

Revision history for this message
Коскин Илья (kasak-9) wrote :

i have tried to upgrade through ssh and directly through console, i have 4 ubuntu servers and all of them have ru_RU locale, and none of them can update, so I think that bug is reproducable on every ru_RU precise server

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

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

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

  * Resolve an encoding issue when a user responds with non-ascii test in the
    text view (LP: #1071388)
 -- Brian Murray <email address hidden> Tue, 11 Dec 2012 16:49:29 -0800

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

I've uploaded this to the quantal -proposed queue where it is awaiting approval.

description: updated
description: updated
Revision history for this message
Коскин Илья (kasak-9) wrote :

ok :) waiting for approval. for now (12/15/2012) error still exists

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted ubuntu-release-upgrader into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:0.190.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubuntu-release-upgrader (Ubuntu Quantal):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Using a Precise system I successfully performed a distribution-upgrade from Precise to Quantal using the ubuntu-release-upgrader from the -proposed repository (do-release-upgrade -p) while using Russian as my language.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

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

---------------
ubuntu-release-upgrader (1:0.190.5) quantal-proposed; urgency=low

  * Resolve an encoding issue when a user responds with non-ascii test in the
    text view (LP: #1071388)
 -- Brian Murray <email address hidden> Wed, 12 Dec 2012 15:53:53 -0800

Changed in ubuntu-release-upgrader (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.