[
https://issues.apache.org/jira/browse/AIRFLOW-2739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16542811#comment-16542811
]
ASF subversion and git services commented on AIRFLOW-2739:
----------------------------------------------------------
Commit f4bcc33564d68b2146fb4fbf6a08f20326069306 in incubator-airflow's branch
refs/heads/v1-10-test from [~cjg]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=f4bcc33 ]
[AIRFLOW-2739] Always read default configuration files as utf-8
Closes #3593 from cjgu/airflow-2739
(cherry picked from commit 78da52fee477b0f7b2ee3481d32a06fca7a9841c)
Signed-off-by: Bolke de Bruin <[email protected]>
> Airflow crashes on startup if LC_ALL env isnt set to utf-8
> ----------------------------------------------------------
>
> Key: AIRFLOW-2739
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2739
> Project: Apache Airflow
> Issue Type: Bug
> Components: configuration
> Affects Versions: 1.10.0
> Environment: Python 3.6.0, Ubuntu 14.04.5 LTS
> Reporter: Carl Johan Gustavsson
> Assignee: Carl Johan Gustavsson
> Priority: Major
> Fix For: 1.10.0
>
>
> When running Airflow 1.10.0 RC1 without LC_ALL environment variable set
> Airflow crashes on start with the following trace
>
> {code:java}
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 Traceback (most
> recent call last):
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 File
> "/opt/virtualenv/tictail/pipeline/bin/airflow", line 21, in <module>
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 from airflow
> import configuration
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 File
> "/opt/virtualenv/tictail/pipeline/lib/python3.6/site-packages/airflow/__init__.py",
> line 35, in <module>
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 from airflow
> import configuration as conf
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 File
> "/opt/virtualenv/tictail/pipeline/lib/python3.6/site-packages/airflow/configuration.py",
> line 106, in <module>
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 DEFAULT_CONFIG
> = f.read()
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 File
> "/opt/virtualenv/tictail/pipeline/lib/python3.6/encodings/ascii.py", line 26,
> in decode
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01 return
> codecs.ascii_decode(input, self.errors)[0]
> Jul 10 08:50:33 hostname supervisord: airflow-webserver-01
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 20770:
> ordinal not in range(128)
> {code}
> This is because the `config_templates/default_airflow.cfg` contains a
> non-ascii character and if LC_ALL isnt set to
> `{color:#000000}en_US.UTF-8{color}` or similar Python will assume the file is
> in ascii.
>
> Solution would be to always open the config files as utf-8 regardless of the
> LC_ALL environment variable.
>
> This worked up until
> [https://github.com/apache/incubator-airflow/commit/16bae5634df24132b37eb752fe816f51bf7e83ca]
> it seems.
>
> Python versions affected, 3.4.0, 3.5.5, 3.6.0
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)