Bug 697835 - LANG=cs_CZ.UTF-8 rhnreg_ks --help causes traceback
Summary: LANG=cs_CZ.UTF-8 rhnreg_ks --help causes traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Suchý
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On: 683546
Blocks: 670159
TreeView+ depends on / blocked
 
Reported: 2011-04-19 11:57 UTC by Marian Ganisin
Modified: 2016-07-04 00:56 UTC (History)
5 users (show)

Fixed In Version: rhn-client-tools-1.0.0-61.el6 yum-rhn-plugin-0.9.1-26.el6
Doc Type: Bug Fix
Doc Text:
rhnreg_ks failed due translated "--help" strings. This was fixed by retrieving translated strings in Unicode.
Clone Of:
Environment:
Last Closed: 2011-05-19 13:06:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0565 0 normal SHIPPED_LIVE rhn-client-tools and yum-rhn-plugin bug fix and ehnancement update 2011-05-18 17:57:10 UTC

Description Marian Ganisin 2011-04-19 11:57:47 UTC
# rhnreg_ks --help
Došlo k chybě:
<type 'exceptions.UnicodeDecodeError'>
Více informací naleznete ve /var/log/up2date
# cat /var/log/up2date 
[Tue Apr 19 03:49:37 2011] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhnreg_ks", line 216, in <module>
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 73, in run
    self.initialize()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 106, in initialize
    (self.options, self.args) = self.optparser.parse_args()
  File "/usr/lib64/python2.6/optparse.py", line 1394, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1434, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1509, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib64/python2.6/optparse.py", line 788, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib64/python2.6/optparse.py", line 810, in take_action
    parser.print_help()
  File "/usr/lib64/python2.6/optparse.py", line 1664, in print_help
    file.write(self.format_help().encode(encoding, "replace"))
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc3 in position 72: ordinal not in range(128)

Comment 1 Marian Ganisin 2011-04-19 11:58:19 UTC
I forget package version:
rhn-setup-1.0.0-60.el6.noarch

Comment 3 Miroslav Suchý 2011-04-19 12:26:32 UTC
I assume you have LC_ALL set to cs_CZ. Right?

Comment 4 Miroslav Suchý 2011-04-19 12:26:59 UTC
Aha, I see it already in subject of this bug.

Comment 5 Marian Ganisin 2011-04-19 12:45:06 UTC
(In reply to comment #4)
> Aha, I see it already in subject of this bug.

Sorry. :) Next time I will put all necessary information in one place.

Comment 9 Miroslav Suchý 2011-04-19 14:58:42 UTC
Already fixed in upstream in BZ 683546

Comment 10 Miroslav Suchý 2011-04-19 15:13:48 UTC
Cherry picked as ef0a64cec0cdcf553e2020d7941ab5c7429dafd8

Comment 12 Marian Ganisin 2011-04-20 07:08:02 UTC
Just for information also execution of rhn_register (without any option) results in same (or similar) error (again with LANG=cs_CZ.UTF-8):

[Wed Apr 20 03:04:20 2011] rhn_register 
Traceback (most recent call last):
  File "/usr/sbin/rhn_register", line 75, in <module>
    app.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 74, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn_register", line 57, in main
    ui.main()
  File "/usr/share/rhn/up2date_client/tui.py", line 1271, in main
    tui = Tui(screen, test)
  File "/usr/share/rhn/up2date_client/tui.py", line 1127, in __init__
    self.drawFrame()
  File "/usr/share/rhn/up2date_client/tui.py", line 1172, in drawFrame
    self.screen.pushHelpLine(_("  <Tab>/<Alt-Tab> between elements  |  <Space> selects  |  <F12> next screen").encode('utf-8'))
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc5 in position 27: ordinal not in range(128)


I suppose it is just a duplicate of issue reported here, hopefully it is already fixed as well.

Comment 13 Miroslav Suchý 2011-04-20 08:48:49 UTC
Yes, I'm aware of that.
It should even affect:
spacewalk-channel
rhn-profile-sync
yum-rhn-plugin

Comment 15 Martin Minar 2011-04-20 09:30:49 UTC
Verified in rhn-client-tools-1.0.0-61.el6 yum-rhn-plugin-0.9.1-26.el6

Reproducer:

]# LANG=cs_CZ.UTF8 rhnreg-ks --help

Comment 16 Miroslav Suchý 2011-05-17 12:46:45 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:
rhnreg_ks failed due translated "--help" strings. This was fixed by retrieving translated strings in Unicode.

Comment 17 errata-xmlrpc 2011-05-19 13:06:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0565.html


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