Why running 'rhn-migrate-classic-to-rhsm --help' on a RHEL 6.3 system, with the locale set to de_DE.UTF-8, fails with an error ?

Solution Verified - Updated -

Issue

  • rhn-migrate-classic-to-rhsm --help command fail when system language is set to de_DE.UTF-8.
[root@example ~]# lang=de_DE.UTF-8 rhn-migrate-classic-to-rhsm --help
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 70, in <module>
    (options, args) = parser.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"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 123: ordinal not in range(128)
[root@example ~]# lang=C rhn-migrate-classic-to-rhsm --help
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 70, in <module>
    (options, args) = parser.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"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 123: ordinal not in range(128)

Environment

  • Red Hat Enterprise Linux 6.3
  • rhn-migrate-classic-to-rhsm
  • subscription-manager-migration-0.99.19.2-1.el6_3.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In