-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Closed
Copy link
Labels
Description
Apache Airflow version
2.2.4 (latest released)
What happened
After setting up alert emails using AWS SES as instructed here, I received the following error message:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 2103, in email_alert
send_email(self.task.email, subject, html_content)
File "/usr/local/lib/python3.8/site-packages/airflow/utils/email.py", line 57, in send_email
return backend(
TypeError: send_email() got multiple values for argument 'from_email'
What you expected to happen
the send_email method in
airflow/airflow/providers/amazon/aws/utils/emailer.py
Lines 25 to 37 in d94fa37
| def send_email( | |
| from_email: str, | |
| to: Union[List[str], str], | |
| subject: str, | |
| html_content: str, | |
| files: Optional[List] = None, | |
| cc: Optional[Union[List[str], str]] = None, | |
| bcc: Optional[Union[List[str], str]] = None, | |
| mime_subtype: str = 'mixed', | |
| mime_charset: str = 'utf-8', | |
| conn_id: str = 'aws_default', | |
| **kwargs, | |
| ) -> None: |
backend method in airflow/airflow/utils/email.py
Lines 57 to 70 in ee9049c
| return backend( | |
| to_comma_separated, | |
| subject, | |
| html_content, | |
| files=files, | |
| dryrun=dryrun, | |
| cc=cc, | |
| bcc=bcc, | |
| mime_subtype=mime_subtype, | |
| mime_charset=mime_charset, | |
| conn_id=backend_conn_id, | |
| from_email=from_email, | |
| **kwargs, | |
| ) |
in the former (provider-amazon), the from_email is the first positional argument. However in the latter (main airflow), from_email is misplaced as a keyword argument.
How to reproduce
- Use
Airflow 2.2.4withproviders-amazon/3.0.0 - Observe the log from a failed DAG
Operating System
Amazon Linux 2
Versions of Apache Airflow Providers
apache-airflow-providers-amazon 3.0.0
Deployment
Other Docker-based deployment
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct