You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/09/02 17:59:03 UTC

[jira] [Commented] (AIRFLOW-2739) Airflow crashes on startup if LC_ALL env isnt set to utf-8

    [ https://issues.apache.org/jira/browse/AIRFLOW-2739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601331#comment-16601331 ] 

Apache Spark commented on AIRFLOW-2739:
---------------------------------------

User 'cjgu' has created a pull request for this issue:
https://github.com/apache/incubator-airflow/pull/3593

> 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)