Description of problem: When running rhnreg_ks with --help option python traceback is raised (maybe due to changes in python optparse module). Version-Release number of selected component (if applicable): RHEL5.7 Server i686 rhn-setup-1.6.17-1.el5 How reproducible: always Steps to Reproduce: 1. run $ LANG=de_DE.utf8 rhnreg_ks --help 2. check output Actual results: Ein Fehler trat auf: exceptions.UnicodeEncodeError Error in sys.excepthook: Traceback (most recent call last): File "/usr/share/rhn/up2date_client/rhncli.py", line 214, in __exceptionHandler sys.stderr.write(_("See /var/log/up2date for more information") + "\n") UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 24: ordinal not in range(128) Original exception was: Traceback (most recent call last): File "/usr/sbin/rhnreg_ks", line 213, in ? 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 112, in initialize (self.options, self.args) = self.optparser.parse_args() File "/usr/lib/python2.4/optparse.py", line 1275, in parse_args stop = self._process_args(largs, rargs, values) File "/usr/lib/python2.4/optparse.py", line 1315, in _process_args self._process_long_opt(rargs, values) File "/usr/lib/python2.4/optparse.py", line 1390, in _process_long_opt option.process(opt, value, values, self) File "/usr/lib/python2.4/optparse.py", line 707, in process return self.take_action( File "/usr/lib/python2.4/optparse.py", line 728, in take_action parser.print_help() File "/usr/lib/python2.4/optparse.py", line 1533, in print_help file.write(self.format_help()) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 64: ordinal not in range(128) Expected results: usage: rhnreg_ks [options] options: -v, --verbose Show additional output --proxy=PROXY Specify an http proxy to use --proxyUser=PROXYUSER Specify a username to use with an authenticated http proxy --proxyPassword=PROXYPASSWORD Specify a password to use with an authenticated http proxy --version show program's version number and exit -h, --help show this help message and exit --profilename=PROFILENAME Einen Profilnamen angeben --username=USERNAME Einen Benutzernamen angeben --password=PASSWORD Geben Sie ein Passwort an --email=EMAIL Geben Sie eine E-Mail-Adresse an --systemorgid=SYSTEMORGID Eine Organisations-ID für dieses System angeben --serverUrl=SERVERURL Geben Sie die zu verwendende Server-URL an --sslCACert=SSLCACERT Geben Sie eine als SSL-CA-Cert zu verwendende Datei an --activationkey=ACTIVATIONKEY Geben Sie einen Aktivierungsschlüssel an --subscription=SUBSCRIPTION Geben Sie eine zu verwendende Installationsnummer an --use-eus-channel Dieses System beim EUS-Channel anmelden, der mit der Red Hat Version dieses Systems verknüpft ist. --contactinfo [Veraltet] Kontaktinformationen von stdin lesen --nohardware Keine Hardware-Informationen ermitteln oder hochladen --nopackages Kein Profil erstellen oder Paketinformationen hochladen --novirtinfo Keine Virtualisierungsinformationen hochladen --norhnsd Nach Fertigstellung rhnsd nicht starten --force Das System registrieren, auch wenn es bereits registriert ist
# rpm -q rhn-setup rhn-setup-1.6.25-1.el6.noarch # LANG=de_DE.utf8 rhnreg_ks --help Usage: rhnreg_ks [options] Options: -v, --verbose Zusätzliche Ausgaben zeigen --proxy=PROXY Geben Sie einen HTTP-Proxy an, der verwendet werden soll --proxyUser=PROXYUSER Geben Sie einen Benutzernamen für die Verwendung mit einem HTTP-Proxy ein, der Authentifizierung erfordert. --proxyPassword=PROXYPASSWORD Geben Sie ein Passwort für die Verwendung mit einem HTTP-Proxy ein, der Authentifizierung erfordert. --version show program's version number and exit -h, --help show this help message and exit --profilename=PROFILENAME Einen Profilnamen angeben --username=USERNAME Einen Benutzernamen angeben --password=PASSWORD Geben Sie ein Passwort an --systemorgid=SYSTEMORGID Eine Organisations-ID für dieses System angeben --serverUrl=SERVERURL Geben Sie die zu verwendende Server-URL an --sslCACert=SSLCACERT Geben Sie eine als SSL-CA-Cert zu verwendende Datei an --activationkey=ACTIVATIONKEY Geben Sie einen Aktivierungsschlüssel an --use-eus-channel Den EUS-Channel, der mit dem Redhat-Release des Systems verbunden ist, für dieses System abonnieren --contactinfo [Veraltet] Kontaktinformationen von stdin lesen --nohardware Keine Hardware-Informationen ermitteln oder hochladen --nopackages Kein Profil erstellen oder Paketinformationen hochladen --novirtinfo Keine Virtualisierungsinformationen hochladen --norhnsd Nach Fertigstellung rhnsd nicht starten --force Das System registrieren, auch wenn es bereits registriert ist Could not reproduce (or it was fixed in mean time). If you can reproduce it again, please reopen (and provide machine with reproducer if you can). Closing for now.
sorry I run my reproducer on el6. on rhel5 it fail as said in #0
To me, this sounds like a clear python-libs-2.4.3-44.el5_7.1 bug as the print_help there does file.write(self.format_help()) and does no care for the fact that the formatted help might be a unicode object and might need to be .encode("utf-8")'d or something similar. So I propose to WONTFIX, or close as dupe of (WONTFIXed) bug 450787.
No objection for a month, closing with WONTFIX.