Bug 710065

Summary: [abrt] yum-3.2.29-17.el6: up2dateErrors.py:177:__repr__:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30: ordinal not in range(128)
Product: Red Hat Enterprise Linux 6 Reporter: Red Hat Case Diagnostics <case-diagnostics>
Component: yum-rhn-pluginAssignee: Michael Mráka <mmraka>
Status: CLOSED ERRATA QA Contact: Martin Minar <mminar>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: admin, mcepl, mkoci, mminar, mmraka, pingale, redhat-bugzilla, robert.scheck
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:35059f76
Fixed In Version: rhn-client-tools-1.0.0-63.el6 yum-rhn-plugin-0.9.1-35.el6 Doc Type: Bug Fix
Doc Text:
Prior to this update, the presence of a UTF-8 character in an error or log message caused rhnplugin to terminate unexpectedly with a traceback. Such messages are now printed as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 16:49:36 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
File: backtrace none

Description Red Hat Case Diagnostics 2011-06-02 11:50:37 UTC
This description generated by Andreas from an ABRT report
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/yum update
component: yum
executable: /usr/bin/yum
kernel: 2.6.32-131.0.15.el6.x86_64
package: yum-3.2.29-17.el6
reason: up2dateErrors.py:177:__repr__:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30: ordinal not in range(128)
release: Red Hat Enterprise Linux Server release 6.1 (Santiago)
reproduce: 1.yum update
2.
3.

time: 1307014893
uid: 0
backtrace: up2dateErrors.py:177:__repr__:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30: 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 274, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 129, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 432, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 882, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 668, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 260, in populateSack
    self.doSetup()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 72, in doSetup
    self.ayum.plugins.run('prereposetup')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 121, in prereposetup_hook
    str(e))
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 177, in __repr__
    "The message was:\n") + self.errmsg
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30: ordinal not in range(128)

Local variables in innermost frame:

Comment 2 Red Hat Case Diagnostics 2011-06-02 11:51:14 UTC
Created attachment 502510 [details]
File: backtrace

Comment 6 Adam Tkac 2011-06-10 12:42:49 UTC
*** Bug 709628 has been marked as a duplicate of this bug. ***

Comment 7 livelace 2011-08-03 15:04:37 UTC
yum --version
3.2.29
  Installed: rpm-4.8.0-16.el6.x86_64 at 2011-06-19 12:00
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2011-03-09 06:32
  Committed: Panu Matilainen <pmatilai> at 2011-03-09

  Installed: yum-3.2.29-17.el6.noarch at 2011-08-03 14:38
  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2011-04-28 17:43
  Committed: James Antill <james.antill> at 2011-04-28



yum update
Loaded plugins: refresh-packagekit, rhnplugin
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 274, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 129, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 432, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 882, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 668, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 260, in populateSack
    self.doSetup()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 72, in doSetup
    self.ayum.plugins.run('prereposetup')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 121, in prereposetup_hook
    str(e))
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 177, in __repr__
    "The message was:\n") + self.errmsg
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

Comment 8 Michael Mráka 2011-08-04 12:50:20 UTC
The issue has been fixed in spacewalk master by
commit 6300588a7586d8974a7b9d3e6e2e65bac448cd20
    710065 - exception messages are in unicode
commit 603ef5a95dd74b7d2120efa283ef9842650bf169
    710065 - handle unicode log messages
commit eb22791ceca8f07bfe598c1c820c74378c586d00
    710065 - handle unicode error messages

Fixed packages in spacewalk: yum-rhn-plugin-1.6.5-1 and rhn-client-tools-1.6.7-1

Comment 9 Michael Mráka 2011-08-08 11:33:50 UTC
Backported to CLIENT-RHEL-6 as
commit db694111474abbdd5c0043579350b1b65903f2b2
    710065 - exception messages are in unicode (cherry picked from commit 6300588a7586d8
commit 0cbb4c7b42a035dc84d0b89d84ddc509ebbbf271
    710065 - handle unicode log messages (cherry picked from commit 603ef5a95dd74b7d2120
commit ceccb1afdc75661c085019564765a7b4c3e105b8
    710065 - handle unicode error messages (cherry picked from commit eb22791ceca8f07bfe

Comment 11 Michael Mráka 2011-08-10 08:58:58 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
yum-rhn-plugin did not like utf8 error messages and they caused tracebacks.

It's been fixed to be able to print utf8 error messages.

Comment 13 Miroslav Suchý 2011-10-11 18:38:08 UTC
*** Bug 745046 has been marked as a duplicate of this bug. ***

Comment 14 Robert Scheck 2011-10-13 10:58:14 UTC
Cross-filed case 00547368 in the customer portal.

Comment 15 Jaromir Hradilek 2011-10-27 16:29:20 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,3 +1 @@
-yum-rhn-plugin did not like utf8 error messages and they caused tracebacks.
+Prior to this update, the presence of a UTF-8 character in an error or log message caused rhnplugin to terminate unexpectedly with a traceback. Such messages are now printed as expected.-
-It's been fixed to be able to print utf8 error messages.

Comment 16 errata-xmlrpc 2011-12-06 16:49:36 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-2011-1664.html