Bug 635432

Summary: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 6: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: Ville-Pekka Vainio <vpvainio>
Component: yumAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 15CC: bigslowfat, ffesti, james.antill, maxamillion, pmatilai, rhughes, tla, zpavlas
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-02 06:20:05 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ville-Pekka Vainio 2010-09-19 13:10:27 EDT
Description of problem:
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 327, in <module>
    pu.main(release)
  File "/usr/share/preupgrade/preupgrade-cli.py", line 265, in main
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 687, in userconfirm
    choice = raw_input(_('Is this ok [y/N]: '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 6: ordinal not in range(128)

This happens when using preupgrade-cli with the fi_FI.UTF-8 locale. I suspect the translation of 'Is this ok' includes the 'ä' character, which is the problem here.

Version-Release number of selected component (if applicable):
preupgrade-1.1.7-1.fc12.noarch
Comment 1 Richard Hughes 2010-09-20 04:58:17 EDT
Reassigning to yum, as I think it's a problem with yum-cli.
Comment 2 seth vidal 2010-09-20 08:16:10 EDT
Ville-Pekka: 

1. does this happen to you in yum, too?
2. what ver of yum is this?
Comment 3 Ville-Pekka Vainio 2010-09-20 09:48:27 EDT
Seth:

This is the yum version which is currently in Fedora 12 stable updates. This error happened while preupgrading a family member's system from F12 to F13. I don't currently have access to that system. I haven't seen this error on F13, though, with 'normal' yum usage.
Comment 4 Ville-Pekka Vainio 2010-11-03 05:01:30 EDT
I'm now seeing this bug in Fedora 13 when preupgrading to Fedora 14.

preupgrade-1.1.8-1.fc13.noarch
yum-3.2.28-5.fc13.noarch
Comment 5 Bug Zapper 2010-11-03 06:00:07 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 '12'.

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 12'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 12 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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Ville-Pekka Vainio 2010-11-03 09:18:41 EDT
This raw_input unicode thing is a known wontfix bug in Python: http://bugs.python.org/issue7768

I can't reproduce this in yum itself, I guess yum is doing something different than preupgrade. The workaround that came to my mind is to print the "Is this OK" message first and then do raw_input without any output separately.
Comment 7 bsfmig 2011-03-17 11:23:03 EDT
A same error preupgrading from F-14 to F-15.
python.x86_64 2.7-8.fc14.1 
yum.noarch    3.2.28-5.fc14


Printed as below:
下载软件包?
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 329, in <module>
    pu.main(release)
  File "/usr/share/preupgrade/preupgrade-cli.py", line 267, in main
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 687, in userconfirm
    choice = raw_input(_('Is this ok [y/N]: '))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
Comment 8 bsfmig 2011-03-17 11:24:06 EDT
Sorry for leaving this alone.
preupgrade.noarch 1.1.9-1.fc15
Comment 9 Bug Zapper 2011-05-31 09:05:56 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  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 '13'.

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 13'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 13 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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Bug Zapper 2011-06-28 08:37:37 EDT
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 11 Ville-Pekka Vainio 2011-11-11 12:04:29 EST
I'm still seeing this bug when updating to F-16 from F-15:

Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 330, in <module>
    pu.main(release)
  File "/usr/share/preupgrade/preupgrade-cli.py", line 268, in main
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 689, in userconfirm
    choice = raw_input(_('Is this ok [y/N]: '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 6:
ordinal not in range(128)

$ rpm -q yum preupgrade
yum-3.2.29-9.fc15.noarch
preupgrade-1.1.10-1.fc15.noarch
Comment 12 Ville-Pekka Vainio 2012-04-17 15:46:03 EDT
This can also be reproduced when updating to F-17 Beta from F-16:

Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 330, in <module>
    pu.main(release)
  File "/usr/share/preupgrade/preupgrade-cli.py", line 268, in main
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 969, in userconfirm
    choice = raw_input(_('Is this ok [y/N]: '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 6: ordinal not in range(128)
Comment 13 Fedora Admin XMLRPC Client 2012-04-27 11:42:14 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 14 Zdeněk Pavlas 2012-05-02 06:20:05 EDT
commit 8b7865ace9ed347b956aada904b9ecdc40ca4963