You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jarek Potiuk (JIRA)" <ji...@apache.org> on 2019/05/23 20:14:00 UTC

[jira] [Resolved] (AIRFLOW-4089) pytz.utc has no attribute name

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

Jarek Potiuk resolved AIRFLOW-4089.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.10.4

> pytz.utc has no attribute name
> ------------------------------
>
>                 Key: AIRFLOW-4089
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4089
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DAG
>    Affects Versions: 1.10.3
>            Reporter: Ricardo Garcia Silva
>            Priority: Blocker
>             Fix For: 1.10.4, 2.0.0
>
>
> According to the [docs|https://airflow.readthedocs.io/en/latest/timezone.html#time-zone-aware-dags], even though pendulum is recommended, a DAG's timezone may also be set by using pytz.
> However, if one uses pytz, models.DAG breaks when trying to use 
> {code:python}
> self.timezone.name
> {code}
> pytz timezones do not have a name attribute
> This error is not immediately apparent, but it manifests under certain circumstances, such as preventing the scheduler from creating new DAGRuns for catching up from previous dates if the DAG has a schedule_interval of 
> {code:python}
> 0 0 * * *
> {code}
> This can be fixed by either changing the code not to rely on the existence of a *name* attribute on the timezone object, or changing the existing documentation in order to clearly state that pendulum *must* be used and not pytz or python's timezone 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)