Skip to content

🪲 Check for email existence before calling mailchimp#6513

Merged
jpelay merged 1 commit intomainfrom
check_for_emails
Feb 26, 2026
Merged

🪲 Check for email existence before calling mailchimp#6513
jpelay merged 1 commit intomainfrom
check_for_emails

Conversation

@jpelay
Copy link
Member

@jpelay jpelay commented Feb 26, 2026

I've seen a few of this exceptions in the logs:

File "/app/website/newsletter.py", line 44, in run
  f()
File "/app/website/newsletter.py", line 117, in create
  r = get_mailchimp_subscriber(email)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/website/newsletter.py", line 172, in get_mailchimp_subscriber
  request_path = f'{MAILCHIMP_API_URL}/members/{get_subscriber_hash(email)}'
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/website/newsletter.py", line 193, in get_subscriber_hash
  return hashlib.md5(email.encode("utf-8")).hexdigest()
                     ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'encode'

@github-project-automation github-project-automation bot moved this to Review for relevance in Newsletter content Feb 26, 2026
@jpelay jpelay merged commit 24baa83 into main Feb 26, 2026
10 of 11 checks passed
@jpelay jpelay deleted the check_for_emails branch February 26, 2026 22:21
@github-project-automation github-project-automation bot moved this from In Progress to Done in Hedy organization board Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: Review for relevance

Development

Successfully merging this pull request may close these issues.

1 participant