Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.
Summary: [ALL LANG][CFSE CLI] Run 'kateloo --help' with no en_US.UTF-8 locale produced...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Localization and Internationalization
Version: 6.0.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Og Maciel
URL:
Whiteboard:
Depends On:
Blocks: 863461
TreeView+ depends on / blocked
 
Reported: 2012-09-20 07:47 UTC by Lijun Li
Modified: 2019-09-26 15:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Running 'katello --help' with UTF-8 locale produced an error: "'ascii' codec can not encode characters in position". This bug fix sets the utf-8 writer for stdout and stderr. The error no longer appears.
Clone Of:
Environment:
Last Closed: 2012-12-04 19:56:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 0 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-05 00:39:57 UTC

Description Lijun Li 2012-09-20 07:47:28 UTC
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:

Comment 3 Ivan Necas 2012-10-05 10:29:31 UTC
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

Comment 4 Ivan Necas 2012-10-05 12:56:39 UTC
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>
  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

Comment 7 Og Maciel 2012-10-08 21:55:25 UTC
# 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)

Comment 8 Og Maciel 2012-10-08 21:55:56 UTC
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

Comment 10 errata-xmlrpc 2012-12-04 19:56:04 UTC
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

Comment 11 Mike McCune 2013-08-16 18:00:24 UTC
getting rid of 6.0.0 version since that doesn't exist


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