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.

Error if AWS_SES_AUTO_THROTTLE set to None

See original GitHub issue

If 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:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
curtismoralescommented, Feb 17, 2022

My apologies on not wrapping up this conversation and fix back in August! Thanks @lukeburden for bumping it!

0reactions
lukeburdencommented, Feb 17, 2022

@pcraciunoiu amazing, thanks for that!

And no worries @curtismorales, thanks for the contribution.

Read more comments on GitHub >

github_iconTop 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 >

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