You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Li Xuanji (JIRA)" <ji...@apache.org> on 2017/03/16 23:44:41 UTC

[jira] [Resolved] (AIRFLOW-705) airflow.configuration.run_command output does not decode command output

     [ https://issues.apache.org/jira/browse/AIRFLOW-705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Li Xuanji resolved AIRFLOW-705.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 1.9.0

Issue resolved by pull request #2053
[https://github.com/apache/incubator-airflow/pull/2053]

> airflow.configuration.run_command output does not decode command output
> -----------------------------------------------------------------------
>
>                 Key: AIRFLOW-705
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-705
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 1.7.1.3
>            Reporter: Scott Kruger
>             Fix For: 1.9.0
>
>
> In python3, command outputs (to {{stdout}} and {{stderr}}) are of type {{bytes}}, not {{str}}.  This causes the following exception when the {{sql_alchemy_conn_cmd}} option is used:
> {noformat}
> Traceback (most recent call last):
>   File "/usr/local/bin/airflow", line 4, in <module>
>     from airflow import configuration
>   File "/usr/local/lib/python3.5/site-packages/airflow/__init__.py", line 29, in <module>
>     from airflow import configuration as conf
>   File "/usr/local/lib/python3.5/site-packages/airflow/configuration.py", line 657, in <module>
>     conf.read(AIRFLOW_CONFIG)
>   File "/usr/local/lib/python3.5/site-packages/airflow/configuration.py", line 519, in read
>     self._validate()
>   File "/usr/local/lib/python3.5/site-packages/airflow/configuration.py", line 447, in _validate
>     "sqlite" in self.get('core', 'sql_alchemy_conn')):
> TypeError: a bytes-like object is required, not 'str'
> {noformat}
> For compatibility between python 2 and 3, {{airflow.configuration.run_command}} should decode {{stdout}} to produce a (unicode) string.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)