Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cli.py #168

Closed
wants to merge 1 commit into from
Closed

Update cli.py #168

wants to merge 1 commit into from

Conversation

rashkur
Copy link

@rashkur rashkur commented Oct 17, 2016

fix for ipa host-find

ipa: ERROR: UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-26: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1339, in run
sys.exit(api.Backend.cli.run(argv))
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1104, in run
rv = cmd.output_for_cli(self.api.Backend.textui, result, _args, *_options)
File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 1029, in output_for_cli
textui.print_entries(result, order, labels, flags, print_all)
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 354, in print_entries
self.print_entry(entry, order, labels, flags, print_all, format, indent)
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 394, in print_entry
label, value, format, indent, one_value_per_line
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 317, in print_attribute
self.print_indented(format % (attr, text[0]), indent)
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 240, in print_indented
print (CLI_TAB * indent + text)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-26: ordinal not in range(128)
ipa: ERROR: an internal error has occurred

fix for ipa host-find

ipa: ERROR: UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-26: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1339, in run
    sys.exit(api.Backend.cli.run(argv))
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1104, in run
    rv = cmd.output_for_cli(self.api.Backend.textui, result, *args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 1029, in output_for_cli
    textui.print_entries(result, order, labels, flags, print_all)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 354, in print_entries
    self.print_entry(entry, order, labels, flags, print_all, format, indent)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 394, in print_entry
    label, value, format, indent, one_value_per_line
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 317, in print_attribute
    self.print_indented(format % (attr, text[0]), indent)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 240, in print_indented
    print (CLI_TAB * indent + text)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-26: ordinal not in range(128)
ipa: ERROR: an internal error has occurred
@tkrizek
Copy link
Contributor

tkrizek commented Nov 8, 2016

Could you please file a ticket for the issue, describing what is the problem and how to reproduce it?

https://fedorahosted.org/freeipa

@tkrizek tkrizek self-assigned this Nov 8, 2016
@rashkur
Copy link
Author

rashkur commented Nov 8, 2016

Sorry, I've already quit the job where I've implemented freeipa, so now stack with bug is unavailable for me :)

@tkrizek
Copy link
Contributor

tkrizek commented Nov 10, 2016

I was not able to find the issue and reproduce the error. Both unicode and ascii strings seem to be printed correctly.

Closing for missing issue/reproducer.

@tkrizek tkrizek closed this Nov 10, 2016
@tkrizek tkrizek added the rejected Pull Request has been rejected label Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected Pull Request has been rejected
Projects
None yet
2 participants