Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when Updating Campaign Content #129

Open
rachaellynn opened this issue May 25, 2017 · 1 comment
Open

Error when Updating Campaign Content #129

rachaellynn opened this issue May 25, 2017 · 1 comment

Comments

@rachaellynn
Copy link

I've been running this script for a few months now, off and on, and just started getting this error when updating campaign content with a template id. The campaign and the template do exist. Please advise! Thanks.

client.campaigns.content.update(campaign_id=campaign_id, data={'template':{'id':template_id}}) #170519 having trouble with this one
  File "/Users/rachael/anaconda2/lib/python2.7/site-packages/mailchimp3/entities/campaigncontent.py", line 51, in update
    return self._mc_client._put(url=self._build_path(campaign_id, 'content'), data=data)
  File "/Users/rachael/anaconda2/lib/python2.7/site-packages/mailchimp3/mailchimpclient.py", line 25, in wrapper
    return fn(self, *args, **kwargs)
  File "/Users/rachael/anaconda2/lib/python2.7/site-packages/mailchimp3/mailchimpclient.py", line 158, in _put
    r.raise_for_status()
  File "/Users/rachael/anaconda2/lib/python2.7/site-packages/requests/models.py", line 844, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://us15.api.mailchimp.com/3.0/campaigns/f457493110/content
@stephenross
Copy link
Collaborator

Sorry for the long delay, are you able to get the campaign itself using the id in the campaigns.get() method, and are you able to get the template with templates.get()? I see that you are obviously providing a value for the campaign_id, could you provide the context around that line on where you are getting the template_id that is being used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants