[
https://issues.apache.org/jira/browse/AIRFLOW-853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862093#comment-15862093
]
ASF subversion and git services commented on AIRFLOW-853:
---------------------------------------------------------
Commit eea5ff8b688c8d7e2aa65c013d36be506a6a532f in incubator-airflow's branch
refs/heads/master from [~myhusky]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=eea5ff8 ]
[AIRFLOW-853] use utf8 encoding for stdout line decode
Closes #2060 from ming-wu/master
> ssh_execute_operator.py stdout decode default to ASCII
> ------------------------------------------------------
>
> Key: AIRFLOW-853
> URL: https://issues.apache.org/jira/browse/AIRFLOW-853
> Project: Apache Airflow
> Issue Type: Bug
> Components: contrib
> Affects Versions: Airflow 2.0
> Reporter: Ming Wu
> Assignee: Ming Wu
> Fix For: 1.8.1
>
>
> I'm running the tutorial example to define a pipeline, and when i ran this
> command :
> $ sudo airflow test flowtest print_date 2016-03-11
> [2017-02-09 17:01:06,221] {models.py:1286} ERROR - 'ascii' codec can't decode
> byte 0xe2 in position 79: ordinal not in range(128)
> Traceback (most recent call last):
> File
> "/opt/rh/python27/root/usr/lib/python2.7/site-packages/airflow/models.py",
> line 1245, in run
> result = task_copy.execute(context=context)
> File
> "/opt/rh/python27/root/usr/lib/python2.7/site-packages/airflow/contrib/operators/ssh_execute_operator.py",
> line 129, in execute
> line = line.decode().strip()
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 79:
> ordinal not in range(128)
> Solution:
> the line.decode() should be used 'utf-8' encoding. the default is ascii
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)