Error if AWS_SES_AUTO_THROTTLE set to None
See original GitHub issueIf I set AWS_SES_AUTO_THROTTLE
to None
in my django settings, I get an error on initializing the SESBackend, I believe because of this commit coercing the setting to a float.
The README instructs users to set AWS_SES_AUTO_THROTTLE
to None
to turn off automatic throttling, as does a comment
Looks like this could be fixed by doing this coercion here or falling back to 0 here
In case it’s helpful to see a traceback:
Traceback (most recent call last):
File "/usr/src/app/./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/usr/src/app/scheduler/management/commands/send_test_email.py", line 24, in handle
send_email(
File "/usr/src/app/authapp/utils.py", line 70, in send_email
email.send()
File "/usr/local/lib/python3.9/site-packages/django/core/mail/message.py", line 284, in send
return self.get_connection(fail_silently).send_messages([self]) File "/usr/local/lib/python3.9/site-packages/django/core/mail/message.py", line 241, in get_connection
self.connection = get_connection(fail_silently=fail_silently)
File "/usr/local/lib/python3.9/site-packages/django/core/mail/__init__.py", line 35, in get_connection
return klass(fail_silently=fail_silently, **kwds) File "/usr/local/lib/python3.9/site-packages/django_ses/__init__.py", line 63, in __init__
self._throttle = float(aws_auto_throttle or settings.AWS_SES_AUTO_THROTTLE)
TypeError: float() argument must be a string or a number, not 'NoneType'
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Error codes for the Amazon EC2 API
Amazon EC2 has two types of error codes: ... IdempotentParameterMismatch, The request uses the same client token as a previous, but non-identical request....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My apologies on not wrapping up this conversation and fix back in August! Thanks @lukeburden for bumping it!
@pcraciunoiu amazing, thanks for that!
And no worries @curtismorales, thanks for the contribution.