Bug 798215

Summary: yum update crashes due to UTF-8 char
Product: Red Hat Enterprise Linux 6 Reporter: Didier Couderc <Didier.Couderc>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 6.2CC: ksrot, mpoole, zpavlas
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:53:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
abrt crash report none

Description Didier Couderc 2012-02-28 10:59:49 UTC
Created attachment 566291 [details]
abrt crash report

Description of problem:
yum update crashes with the following backtrace

Version-Release number of selected component (if applicable):
_init__.py:2000:downloadPkgs:UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 52: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 276, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 211, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 498, in doTransaction
    problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2000, in downloadPkgs
    adderror(po, str(e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 52: ordinal not in range(128)

Setting LANG=C instead of fr_FR@euro and restarting the update worked.

Comment 2 James Antill 2012-03-02 21:55:36 UTC
 This is a simple str => exception2msg upstream. Should fix it.

Comment 6 Karel Srot 2012-03-06 13:53:01 UTC
In which scenario is the updated function adderror(po, str(e)) used? 
I tried to reproduce the bug with the same update and LANG settings but it didn't work. Seems that it was some occasional error.

Comment 7 Zdeněk Pavlas 2012-03-06 14:13:28 UTC
That piece of code handles mostly messages from urlgrabber, these are AFAIK not localized. 'Insufficient space in download directory' from Yum is localized, so that should trigger the bug.

Comment 10 errata-xmlrpc 2012-06-20 13:53:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0857.html