Bug 467088 - preupgrade-cli traceback using YumOutput.userconfirm() (i18n issue)
preupgrade-cli traceback using YumOutput.userconfirm() (i18n issue)
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-15 13:15 EDT by Johan Cwiklinski
Modified: 2014-01-21 18:06 EST (History)
8 users (show)

See Also:
Fixed In Version: F8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-26 12:37:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Johan Cwiklinski 2008-10-15 13:15:39 EDT
Description of problem:
After preupgrade-cli has found the dependencies from yum, it crashes with:
Taille totale des téléchargement : 1.4 G                                                                                                    
Download packages?                                                                                                                          
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):

How reproducible:

Steps to Reproduce:
1. install preupgrade
2. run 'preupgrade-cli "Fedora 9 (Sulphur)"'
3. see it crash
Actual results:
crash :)

Expected results:
should pre-upgrade the system :)

Additional info:
I think it's a localisation issue, since 'LANG=C preupgrade-cli "Fedora 9 (Sulphur)"' works as expected.
Comment 1 Will Woods 2008-10-29 15:11:34 EDT
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.
Comment 2 James Antill 2008-10-29 15:24:09 EDT
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().
Comment 3 Will Woods 2008-10-29 15:29:24 EDT
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.
Comment 4 Will Woods 2008-10-29 15:47:43 EDT
Fixed in bzr rev 217; this will land in the next preupgrade build. Until then, forcing LANG=C is a good workaround.
Comment 5 Bug Zapper 2008-11-26 06:14:37 EST
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: 
Comment 6 Jon Stanley 2008-11-26 12:37:53 EST
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!
Comment 7 Mariusz Pluciński 2011-06-04 14:41:13 EDT
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.
Comment 8 Mariusz Pluciński 2011-06-04 14:57:44 EDT
Sorry, I forgot to mention:
and LANG is set to "pl_PL.UTF-8"
Comment 9 Mariusz Pluciński 2011-06-04 15:26:09 EDT
Sorry, I forgot to mention:
and LANG is set to "pl_PL.UTF-8"

Note You need to log in before you can comment on or make changes to this bug.