MailChimp.Api.Net
MailChimp.Api.Net copied to clipboard
not responding
Installed versions : [MailChimp.Api.Net 3.0.0]
Description I want to create a new campaign. Before that i want to collect a list of existing campaigns to verify if this one exist. I run the following command
MailChimpCampaigns _Campaigns = new MailChimpCampaigns();
var x = _Campaigns.GetCampaignsAsync().Result;
The x should be a rootcampgain object with a list of campaigns in it. But this command times out/never gives results.
if i run
var x = _Campaigns.GetCampaignsAsync()
i got an instant reply back, but not with a collection of existing campaigns. Just
Any ideas/suggestoins what i am doing wrong here?
Best regards, Marcel
You are trying to read the Result before the async has completed.
something like this should work...
MailChimpCampaigns _Campaigns = new MailChimpCampaigns(); var m = _Campaigns.GetCampaignsAsync(); while (m.Status == TaskStatus.WaitingForActivation || m.Status == TaskStatus.WaitingForChildrenToComplete || m.Status == TaskStatus.WaitingToRun) { Thread.Sleep(100); } var x = m.Result;
However when I tried it I am getting an exception
Could not convert string to integer: {listID}. Path 'campaigns[0].settings.folder_id', line 1, position 643.
{listID} was one of my lists. The lsitId is not necessarily numeric characters only. This might be a bug, I am not sure.
It seems to get stuck in a loop. Below the code. If i put a breakpoint on the sleep it will hit it, so i am sure it still runs. Also the status of M in the watchwindow keeps (not yet completed).
Could it take that long??
So to confirm the break point on line 29 never gets hit?
Correct. Up to this moment (13.39 ) it is not being hit. It is running now for over 15 minutes
That is kind of strange. It worked perfectly for me. Took a couple seconds for the async operation to finish. I am not so sure what else to suggest. I only just started using Mailchimp.Api.Net this morning. Sorry I couldn't be more help.
now worries, i will keep digging until i find the cause of this.
I have the same issue, was it solved somehow?
I'm also gettting same issue.