Red Hat Bugzilla – Bug 858960
[ALL LANG][CFSE CLI] Run 'kateloo --help' with no en_US.UTF-8 locale produced traceback: 'ascii' codec can't encode characters in position.
Last modified: 2013-08-16 14:00:24 EDT
Description of problem: Run 'kateloo --help' with UTF-8 locale produced traceback: 'ascii' codec can't encode characters in position. Version-Release number of selected component (if applicable): katello-1.1.12-7.el6cf.noarch katello-cli-1.1.8-4.el6cf.noarch How reproducible: 100% Steps to Reproduce: 1. Install latest CloudForms System Engine build. 2. Run from terminal: LANG=ja_JP.UTF-8 katello --help Actual results: [root@cfsetest ~]# LANG=ja_JP.UTF-8 katello --help error: 'ascii' codec can't encode characters in position 80-101: ordinal not in range(128) (more in the log file /var/log/katello/client.log) You have mail in /var/spool/mail/root [root@cfsetest ~]# cat /var/log/katello/client.log 2012-09-19 21:08:13,596 [ERROR][MainThread] error() @ base.py:184 - 'ascii' codec can't encode characters in position 80-101: ordinal not in range(128) 2012-09-19 21:08:13,597 [ERROR][MainThread] error() @ base.py:185 - Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 197, in main ret_code = super(KatelloCLI, self).main(args, command_name, parent_usage) File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 293, in main self.process_options(parser, args) File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 211, in process_options self.opts, self.args = parser.parse_args(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/lib/python2.6/site-packages/katello/client/i18n_optparse.py", line 76, in print_help out_file.write(self.format_help()) UnicodeEncodeError: 'ascii' codec can't encode characters in position 80-101: ordinal not in range(128) Expected results: No Traceback. Additional info:
This issue is somehow related to https://bugzilla.redhat.com/show_bug.cgi?id=845198#c10 Like this problem, it occurs only with environment with LC_CTYPE=en_US.UTF-8
The fix is merged to katello https://github.com/Katello/katello/pull/798 Branch: refs/heads/master Home: https://github.com/Katello/katello Commit: d650484f2c66df5ef8a11179a17094091fdfca65 https://github.com/Katello/katello/commit/d650484f2c66df5ef8a11179a17094091fdfca65 Author: Ivan Necas <inecas@redhat.com> Date: 2012-10-05 (Fri, 05 Oct 2012) Changed paths: M cli/src/katello/client/utils/encoding.py Log Message: ----------- 858960 - always set the utf-8 writer for stdout and stderr
# LANG=ja_JP.UTF8 katello -u admin -p admin --help Usage: katello <options> <command> Supported Commands: activation_key Katello サーバーのアクティベーションキーに固有の動作 admin 各種管理動作 changeset Katello サーバーで変更セットに固有の動作 client Katello サーバーのクライアントに固有の動作 distribution Katello サーバーでのリポジトリ固有の動作 environment Katello サーバーの環境に固有の動作 errata Katello サーバーのエラータに固有の動作 filter katello サーバーでフィルタ固有の動作 gpg_key katello サーバーで GPG キーに固有の動作 org Katello サーバーの組織に固有の動作 package Katello サーバーでのパッケージ固有の動作 package_group Katello サーバーのパッケージグループに固有の動作 permission katello サーバーでパーミッションに固有の動作 ping Katello サーバーのステータスを取得 product Katello サーバーで製品に固有の動作 provider Katello サーバーのプロバイダーに固有の動作 repo Katello サーバーでのリポジトリ固有の動作 shell シェルとして cli を実行 sync_plan katello サーバーで同期プランに固有の動作 system Katello サーバーのシステムに固有の動作 system_group katello サーバーでのシステムグループ固有の動作 template Katello サーバーのテンプレートに固有の動作 user Katello サーバーでのユーザー固有の動作 user_role katello サーバー内でのユーザーロール固有の動作 version katello サーバーのバージョンを取得 Options: -h, --help show this help message and exit -v, --version バージョン情報を表示します -d, --debug デバッグ情報をログに送信します Katello ユーザーアカウントの資格情報: -u USERNAME, --username=USERNAME アカウントのユーザー名 -p PASSWORD, --password=PASSWORD アカウントのパスワード Katello サーバー情報: --host=HOST Katello サーバーのホスト名 (デフォルト: localhost.localdomain)
Verified: * candlepin-0.7.8.1-1.el6cf.noarch * candlepin-selinux-0.7.8.1-1.el6cf.noarch * candlepin-tomcat6-0.7.8.1-1.el6cf.noarch * katello-1.1.12-14.el6cf.noarch * katello-all-1.1.12-14.el6cf.noarch * katello-candlepin-cert-key-pair-1.0-1.noarch * katello-certs-tools-1.1.8-1.el6cf.noarch * katello-cli-1.1.8-7.el6cf.noarch * katello-cli-common-1.1.8-7.el6cf.noarch * katello-common-1.1.12-14.el6cf.noarch * katello-configure-1.1.9-7.el6cf.noarch * katello-glue-candlepin-1.1.12-14.el6cf.noarch * katello-glue-pulp-1.1.12-14.el6cf.noarch * katello-qpid-broker-key-pair-1.0-1.noarch * katello-qpid-client-key-pair-1.0-1.noarch * katello-selinux-1.1.1-1.el6cf.noarch * pulp-1.1.12-1.el6cf.noarch * pulp-common-1.1.12-1.el6cf.noarch * pulp-selinux-server-1.1.12-1.el6cf.noarch
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/RHSA-2012-1543.html
getting rid of 6.0.0 version since that doesn't exist