You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using client.lists.members.create_or_update method I get this error if the user actually exists (the actual email is hidden for privacy concerns):
MailChimpError: {'type': 'http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/', 'title': 'Member Exists', 'status': 400, 'detail': '(SOME_EMAIL_HERE)@domain.com is already a list member. Use PUT to insert or update list members.', 'instance': 'd9d8f23a-87e9-4add-9fb3-204ccb0151d9'}
...
File "mailchimp3/entities/listmembers.py", line 165, in create_or_update
return self._mc_client._put(url=self._build_path(list_id, 'members', subscriber_hash), data=data)
File "mailchimp3/mailchimpclient.py", line 30, in wrapper
return fn(self, *args, **kwargs)
File "mailchimp3/mailchimpclient.py", line 257, in _put
_raise_response_error(r)
File "mailchimp3/mailchimpclient.py", line 44, in _raise_response_error
raise MailChimpError(error_data)
This is are the arguments aI use to call the method:
This seems strange as I am using create_or_update method which assumes that the user can already exist and I think that create_or_update actually uses PUT method.
Am I doing something wrong here? How can this be fixed?
The text was updated successfully, but these errors were encountered:
@DataGreed I will need to look further into this, but for starters, we do have a helper function called check_subscriber_hash that lives in mailchimp3.helpers that you can use to convert an email address to a hash without any additional changes. We do also run that on anything that expects a subscriber hash so you can provide either the hash or the email address raw to that kwarg.
It is possible that the hash that you provided does not match the hash that Mailchimp has, so when you attempted to update the user, it was looking for a record at say XYZ, didn't find it, checked the email and saw ABC, tried to create that record, and found an existing record for ABC. You must supply the subscriber hash that MailChimp already has in the system if you are attempting to change a user's email address and this function is one of the few ways you can make that change, though the hash you provide would need to be for the old email, and the hash you get back would match their new email address. Try using the helper function or passing the email straight, and if you are still having problems, we might need more info.
When using
client.lists.members.create_or_update
method I get this error if the user actually exists (the actual email is hidden for privacy concerns):This is are the arguments aI use to call the method:
Library version is
3.0.12
running on Python 3.6This seems strange as I am using
create_or_update
method which assumes that the user can already exist and I think thatcreate_or_update
actually uses PUT method.Am I doing something wrong here? How can this be fixed?
The text was updated successfully, but these errors were encountered: