RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 714113 - [abrt] yum-3.2.27-14.el6: up2dateLog.py:57:write_log:UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-24: ordinal not in range(128)
Summary: [abrt] yum-3.2.27-14.el6: up2dateLog.py:57:write_log:UnicodeEncodeError: 'asc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools
Version: 6.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Michael Mráka
QA Contact: Martin Minar
URL:
Whiteboard: abrt_hash:2f16c311
: 786985 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-17 11:29 UTC by Red Hat Case Diagnostics
Modified: 2018-11-14 11:58 UTC (History)
7 users (show)

Fixed In Version: rhn-client-tools-1.0.0-64.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.
Clone Of:
Environment:
Last Closed: 2011-12-06 16:49:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.65 KB, text/plain)
2011-06-17 11:29 UTC, Red Hat Case Diagnostics
no flags Details
File: backtrace (2.18 KB, text/plain)
2011-08-06 14:27 UTC, Red Hat Case Diagnostics
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 58733 0 None None None Never
Red Hat Product Errata RHBA-2011:1664 0 normal SHIPPED_LIVE rhn-client-tools and yum-rhn-plugin bug fix update 2011-12-06 00:50:18 UTC

Description Red Hat Case Diagnostics 2011-06-17 11:29:04 UTC
This description generated by Andreas from an ABRT report
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/yum install libtiff-devel
component: yum
executable: /usr/bin/yum
kernel: 2.6.32-71.el6.x86_64
package: yum-3.2.27-14.el6
reason: up2dateLog.py:57:write_log:UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-24: ordinal not in range(128)
release: Red Hat Enterprise Linux Workstation release 6.1 (Santiago)
reproduce: 1.yum install libtiff-develを実行したら発生
2.
3.

time: 1308342371
uid: 0
backtrace: up2dateLog.py:57:write_log:UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-24: 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 211, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 584, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1527, in runTransaction
    self.plugins.run('posttrans')
  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 221, in posttrans_hook
    str(e))
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 179, in __repr__
    log.log_me(msg)
  File "/usr/share/rhn/up2date_client/up2dateLog.py", line 37, in log_me
    self.write_log(s)
  File "/usr/share/rhn/up2date_client/up2dateLog.py", line 57, in write_log
    msg = "%s %s\n" % (self.log_info, str(s))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-24: ordinal not in range(128)

Local variables in innermost frame:
s: u'\u30b5\u30fc\u30d0\u3068\u306e\u901a\u4fe1\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30e1\u30c3\u30bb\u30fc\u30b8:\nConnection timed out on readline'
log_file: <open file '/var/log/up2date', mode 'a' at 0x48cf540>
log_name: '/var/log/up2date'
self: <up2date_client.up2dateLog.Log instance at 0x2f9c9e0>

Comment 2 Red Hat Case Diagnostics 2011-06-17 11:29:39 UTC
Created attachment 505247 [details]
File: backtrace

Comment 5 Miroslav Suchý 2011-06-17 15:13:29 UTC
Fixed in spacewalk.git in commit 400df68c3498fc4800aa449e1ed9dc2226542e1c

Comment 8 Red Hat Case Diagnostics 2011-08-06 14:27:27 UTC
Created attachment 516991 [details]
File: backtrace

Comment 10 Michael Mráka 2011-08-08 11:32:06 UTC
Backported to CLIENT_RHEL-6 as
commit 159c638cdf862afbf8cd14fad1028e21aa1dc743
    714113 - handle writing unicode to log file (cherry picked from commit 400df68c3498f

Comment 12 Michael Mráka 2011-08-10 08:59:40 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 log messages and they caused tracebacks.

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

Comment 15 Jaromir Hradilek 2011-10-27 16:29:25 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 log 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 messages to log file.

Comment 16 errata-xmlrpc 2011-12-06 16:49:42 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

Comment 17 Miroslav Suchý 2012-02-14 09:51:00 UTC
*** Bug 786985 has been marked as a duplicate of this bug. ***


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