airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ming Wu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AIRFLOW-853) ssh_execute_operator.py stdout decode default to ASCII
Date Thu, 09 Feb 2017 17:18:41 GMT
Ming Wu created AIRFLOW-853:
-------------------------------

             Summary: 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


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)

Mime
View raw message