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)
[abrt] yum-3.2.27-14.el6: up2dateLog.py:57:write_log:UnicodeEncodeError: 'asc...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
6.0
x86_64 Unspecified
medium Severity medium
: rc
: ---
Assigned To: Michael Mráka
Martin Minar
abrt_hash:2f16c311
:
: 786985 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-17 07:29 EDT by Red Hat Case Diagnostics
Modified: 2016-07-03 20:56 EDT (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 11:49:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 58733 None None None Never

  None (edit)
Description Red Hat Case Diagnostics 2011-06-17 07:29:04 EDT
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 07:29:39 EDT
Created attachment 505247 [details]
File: backtrace
Comment 5 Miroslav Suchý 2011-06-17 11:13:29 EDT
Fixed in spacewalk.git in commit 400df68c3498fc4800aa449e1ed9dc2226542e1c
Comment 8 Red Hat Case Diagnostics 2011-08-06 10:27:27 EDT
Created attachment 516991 [details]
File: backtrace
Comment 10 Michael Mráka 2011-08-08 07:32:06 EDT
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 04:59:40 EDT
    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 12:29:25 EDT
    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 11:49:42 EST
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 04:51:00 EST
*** 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.