-
Notifications
You must be signed in to change notification settings - Fork 63
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
client.campaigns() TypeError: 'type' object is not iterable #77
Comments
I had the same issue. An older installation with createsend pip 6.1.2 module works well, with createsend 7.0.0 the same code doesn't work anymore. According to the release notes: Breaking: 'client.campaigns' now returned an object to support pagination (use .Results to get the array of campaigns) for cm in client.campaigns().Results: This works ! |
It's happening to me as well. Looks like this wrapper isn't updated. Anyone lucky in acquiring list of campaignIds? |
As said, use .Results for cl in clients: |
Hi Thanks speedy! Turns out it's because i used a differnt funciton to get client:
changed it to client = Client({'api_key': ''}, cl.ClientID) and now it's working Thanks for the headsup |
hello
when i run
cs = CreateSend(auth)
clients = cs.clients()
campaign_ids = cs.clients()
for cl in clients:
print("Client: %s" % cl.Name)
client = Client(auth, cl.ClientID)
print("- Campaigns:")
for cm in client.campaigns():
print(" - %s" % cm.Subject)
print(" - %s" % cm.CampaignID)
i have this issue
File "C:\Users\eguevara\AppData\Local\Temp/ipykernel_17348/3998498663.py", line 1, in
for i in client.campaigns():
TypeError: 'type' object is not iterable
The text was updated successfully, but these errors were encountered: