Hao Ye created AIRFLOW-171:
------------------------------

             Summary: 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: 
['[email protected]']
[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