Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

Tower streaming stdout breaks with unicode  #744

@stenyjames

Description

@stenyjames

Hello,
The tower-cli version 3.3.7 is throwing this error while monitoring the streaming output from tower

Ansible Tower Version used : 3.4.1. Please advise, if there is any fix for it.

------Starting Standard Out Stream------
Traceback (most recent call last):
File "/usr/bin/tower-cli", line 9, in
load_entry_point('ansible-tower-cli==3.3.7', 'console_scripts', 'tower-cli')()
File "/usr/lib64/python2.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/tower_cli/cli/base.py", line 129, in invoke
return super(TowerCLI, self).invoke(ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/tower_cli/conf.py", line 373, in method_with_context_managed
method(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/tower_cli/cli/resource.py", line 107, in func
result = method(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/tower_cli/models/base.py", line 893, in monitor
click.echo(content, nl=0, file=outfile)
File "/usr/lib64/python2.7/site-packages/click/utils.py", line 260, in echo
file.write(message)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u05a7' in position 1: ordinal not in range(128)
[Pipeline] }
ERROR: script returned exit code 1
Retrying

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions