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

Hao Ye commented on AIRFLOW-171:
--------------------------------

Thanks, I got it working.

We had an older version of the config that pointed to
email_backend = airflow.utils.send_email_smtp
instead of 
email_backend = airflow.utils.email.send_email_smtp.

On that note, is there an easy way to detect config changes when upgrading? We 
currently keep our config across upgrades and so may not pick up new changes.

> Email does not work in 1.7.1.2
> ------------------------------
>
>                 Key: AIRFLOW-171
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-171
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 1.7.1
>         Environment: AWS Amazon Linux Image
>            Reporter: Hao Ye
>
> Job failure emails was working in 1.7.0. They seem to have stopped working in 
> 1.7.1.
> Error is
> {quote}
> [2016-05-25 00:48:02,334] {models.py:1311} ERROR - Failed to send email to: 
> ['em...@email.com']
> [2016-05-25 00:48:02,334] {models.py:1312} ERROR - 'module' object has no 
> attribute 'send_email_smtp'
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/site-packages/airflow/models.py", line 1308, 
> in handle_failure
>     self.email_alert(error, is_retry=False)
>   File "/usr/local/lib/python2.7/site-packages/airflow/models.py", line 1425, 
> in email_alert
>     send_email(task.email, title, body)
>   File "/usr/local/lib/python2.7/site-packages/airflow/utils/email.py", line 
> 42, in send_email
>     backend = getattr(module, attr)
> AttributeError: 'module' object has no attribute 'send_email_smtp'
> {quote}
> File exists and method exists. Seems to work fine when called in python 
> directly.
> Maybe it's loading the wrong email module.
> Tried to set PYTHONPATH to have 
> /usr/local/lib/python2.7/site-packages/airflow earlier in the path, but that 
> didn't seem to work either.
> Could this be related to the utils refactoring that happened between 1.7.0 
> and 1.7.1?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to