Red Hat Bugzilla – Bug 467088
preupgrade-cli traceback using YumOutput.userconfirm() (i18n issue)
Last modified: 2014-01-21 18:06:45 EST
Description of problem:
After preupgrade-cli has found the dependencies from yum, it crashes with:
Taille totale des téléchargement : 1.4 G
Traceback (most recent call last):
File "/usr/share/preupgrade/preupgrade-cli.py", line 153, in <module>
util = PreUpgradeCli()
File "/usr/share/preupgrade/preupgrade-cli.py", line 40, in __init__
File "/usr/share/preupgrade/preupgrade-cli.py", line 99, in main
if not self.userconfirm():
File "/usr/share/yum-cli/output.py", line 414, in userconfirm
choice = raw_input(_('Is this ok [y/N]: '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. install preupgrade
2. run 'preupgrade-cli "Fedora 9 (Sulphur)"'
3. see it crash
should pre-upgrade the system :)
I think it's a localisation issue, since 'LANG=C preupgrade-cli "Fedora 9 (Sulphur)"' works as expected.
This is actually a bug with yum's handling of unicode stuff. Reassigning.
We don't have any translations for preupgrade yet anyway, so I'm going to force LANG=C in preupgrade-cli as a workaround until this gets fixed and pushed back to F8/F9.
Both Fedora 8 and Fedora 9 have yum-3.2.19-3.fc8 released ... what is the version you were running against? I know we've gone back on forth on doing something special on that line ... if it's a recent version it might just be eaiser if preupgrade depended on >= 3.2.19 and called yum.misc.setup_locale().
I confirmed it with yum-3.2.19-3.fc9 and LANG=fr_FR.utf8.
Calling setup_locale() is definitely an option. I'll look into it.
Fixed in bzr rev 217; this will land in the next preupgrade build. Until then, forcing LANG=C is a good workaround.
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '8'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 8's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 8 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
As this bug is in MODIFIED, Fedora believes that a fix has been committed that resolves the problem listed in this bug report.
If this is not the case, please re-open this report, noting the version of the package that you reproduced the bug against.
Thanks for the report!
Unfortunately, it seems that this bug still exists. I encouraged it today while trying to upgrade to Fedora 15. Error message is exact that same like this in problem description (one difference is character which cannot be encoded; I am using polish translation, and in my case this is character u'\u105' in position 6). Workaround with LANG=C works as expected.
Sorry, I forgot to mention:
and LANG is set to "pl_PL.UTF-8"