Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1126763 - [ovirt-engine-cli] in cli engine failed to redirect Unicode characters to file
Summary: [ovirt-engine-cli] in cli engine failed to redirect Unicode characters to file
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: Shai Revivo
Whiteboard: infra
Depends On:
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
Reported: 2014-08-05 08:35 UTC by Kobi Hakimi
Modified: 2016-02-10 19:08 UTC (History)
7 users (show)

Fixed In Version: rhevm-cli-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-11 18:10:33 UTC
oVirt Team: Infra
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0185 normal SHIPPED_LIVE rhevm-cli bug fix and enhancement update 2015-02-11 22:39:13 UTC
oVirt gerrit 31661 master MERGED cli: Use UTF-8 for writing output files Never
oVirt gerrit 31691 cli_3.5 MERGED cli: Use UTF-8 for writing output files Never

Description Kobi Hakimi 2014-08-05 08:35:53 UTC
Description of problem:
[ovirt-engine-cli] in cli engine failed to redirect Unicode characters to file

Version-Release number of selected component (if applicable):
 Red Hat Enterprise Virtualization Manager Version: 3.4.0-0.21.el6ev 

How reproducible:

Steps to Reproduce:
1. Create new VM with unicode name like : čeněk
2. Open the cli engine and run the command: 
   show vm --id "<new-vm-id>" > /tmp/test.log

Actual results:
failed with the following error:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/cli/", line 191, in execute_string
  File "/usr/lib/python2.6/site-packages/cli/", line 411, in _execute_command
  File "/usr/lib/python2.6/site-packages/cli/command/", line 101, in run
  File "/usr/lib/python2.6/site-packages/ovirtcli/command/", line 152, in execute
    self.context.formatter.format(self.context, obj)
  File "/usr/lib/python2.6/site-packages/ovirtcli/format/", line 269, in format
    self._format_resource(result.superclass, show_empty=show_all)
  File "/usr/lib/python2.6/site-packages/ovirtcli/format/", line 222, in _format_resource
    self.__write_context(format0, format1, width1, field, value, resource_context, reduced_mode_fields=reduced_mode_fields, mode=mode)
  File "/usr/lib/python2.6/site-packages/ovirtcli/format/", line 137, in __write_context
    stdout.write(format1 % val)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 0: ordinal not in range(128)

Expected results:
Run with support to Unicode characters 

Additional info:
when run the command without redirect its run OK.
 show vm --id "<new-vm-id>"

Comment 1 Kobi Hakimi 2014-09-10 05:51:28 UTC
1. adding new cluster named čeněk
2. in cli api run the command:  list clusters --show-all > /tmp/test_kobi.log

Result: run without errors and redirect the output to the file - fixed

Comment 3 errata-xmlrpc 2015-02-11 18:10:33 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.

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