question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Function arg list mismatch between provider code and main code when using AWS SES

See original GitHub issue

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 https://github.com/apache/airflow/blob/d94fa378305957358b910cfb1fe7cb14bc793804/airflow/providers/amazon/aws/utils/emailer.py#L25-L37 doesn’t match the invocation of the backend method in https://github.com/apache/airflow/blob/ee9049c0566b2539a247687de05f9cffa008f871/airflow/utils/email.py#L57-L70

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

  1. Use Airflow 2.2.4 with providers-amazon/3.0.0
  2. 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
repl-mike-roestcommented, Mar 15, 2022

Awesome yep @potiuk let me see what I can do to help out on things

0reactions
potiukcommented, Mar 15, 2022

See #22264 - it contains information about the release candidate and link to instructions on how to test it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monitoring your Amazon SES sending activity
Monitor your current sending activity by regularly watching your number of bounces, complaints, deliveries, sent emails, and rejected emails to identify and ...
Read more >
Amazon SES email sending errors - AWS Documentation
Troubleshoot types of email sending-specific errors that you might encounter when you send an email through Amazon SES.
Read more >
Error Responses - Amazon Simple Storage Service
Error Code Description HTTP Status Code AccessControlListNotSupported The bucket does not allow ACLs. 400 Bad Request AccessDenied Access Denied 403 Forbidden BucketAlreadyOwnedByYou 409 Conflict (in all...
Read more >
Troubleshoot invocation issues in Lambda
Invocation errors can be caused by issues with request parameters, event structure, function settings, user permissions, resource permissions, or limits.
Read more >
Resolve template validation or template format errors in ...
Validate your JSON or YAML templates with the AWS CloudFormation ... "An array containing the list of values allowed for the parameter", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found