Scott Kruger created AIRFLOW-705:
------------------------------------
Summary: 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
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.4#6332)