Re: NullReferenceException on DownloadReportToStream when downloading ad report

2012-03-27 Thread Anash P. Oommen
Hi Joanna,

I released a new version of the library that addresses this issue. Thanks 
for reporting the issue and identifying the cause.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Tuesday, 27 March 2012 16:01:40 UTC+5:30, Joanna wrote:
>
> Hi Anash,
> I found the reason for the error was the timeout. The value from the app 
> config was not used in the request so when I have set it manually it was 
> working. I will add this to the issues list.
> Best regards,
> Joanna
>
> W dniu poniedziałek, 12 marca 2012, 15:36:32 UTC+1 użytkownik Anash P. 
> Oommen napisał:
>>
>> Hi Joanna,
>>
>> Could you email your app.config (or the line number at which the code 
>> fails) to anash.p.oom...@google.com? The code looks perfectly fine, so I 
>> suspect it has something to do with the configuration settings.
>>
>> Cheers,
>> Anash P. Oommen,
>> AdWords API Advisor.
>>
>> On Thursday, 1 March 2012 22:05:46 UTC+5:30, Joanna wrote:
>>>
>>> Hello,
>>> Since two weeks ago I cannot download the AD REPORT. I am using the API 
>>> v201109 and the .net Google.Adwords library version 14. I query using the 
>>> following report definition
>>>
>>> Predicate campaignPredicate = new Predicate();
>>> campaignPredicate.field = "CampaignName";
>>> campaignPredicate.@operator = PredicateOperator.STARTS_WITH;
>>> campaignPredicate.values = new String[] { "API" };
>>>
>>> Predicate adPredicate = new Predicate();
>>> adPredicate.field = "AdType";
>>> adPredicate.@operator = PredicateOperator.EQUALS;
>>> adPredicate.values = new String[] { "TEXT_AD" };
>>>
>>> // Create selector.
>>> Selector selector = new Selector();
>>>
>>> selector.fields = new string[] {
>>> "Id",
>>> "CampaignId",
>>> "AdGroupId",
>>> "Url",
>>> "Description1",
>>> "Description2",
>>> "Headline", 
>>> "DisplayUrl",
>>> "Status", 
>>> "CampaignStatus",
>>> "AdGroupStatus" 
>>>  
>>> };
>>>
>>> selector.predicates = new Predicate[] { campaignPredicate, 
>>> adPredicate };
>>>
>>> ReportDefinition reportDefinition = new ReportDefinition();
>>> reportDefinition.reportName = " " + DateTime.Now;
>>> reportDefinition.dateRangeType = 
>>> ReportDefinitionDateRangeType.ALL_TIME;
>>> reportDefinition.reportType = 
>>> ReportDefinitionReportType.AD_PERFORMANCE_REPORT;
>>> reportDefinition.downloadFormat = DownloadFormat.GZIPPED_CSV;
>>> reportDefinition.selector = selector;
>>>
>>> I get NullReferenceException. Here is the stacktrace:
>>>
>>> Exception: System.NullReferenceException: Object reference not set to an 
>>> instance of an object.
>>>at 
>>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String
>>>  
>>> downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, Stream 
>>> outputStream, String postBody)
>>>at 
>>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToDisk(String
>>>  
>>> downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, String 
>>> path, String postBody)
>>>at 
>>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T
>>>  
>>> reportDefinitionOrId, Boolean returnMoneyInMicros, String path)
>>>at 
>>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T
>>>  
>>> reportDefinitionOrId, String path)
>>>
>>> I would be very gratefull if someone could help me.
>>> Joanna
>>>
>>>
>> On Thursday, 1 March 2012 22:05:46 UTC+5:30, Joanna wrote:
>>>
>>> Hello,
>>> Since two weeks ago I cannot download the AD REPORT. I am using the API 
>>> v201109 and the .net Google.Adwords library version 14. I query using the 
>>> following report definition
>>>
>>> Predicate campaignPredicate = new Predicate();
>>> campaignPredicate.field = "CampaignName";
>>> campaignPredicate.@operator = PredicateOperator.STARTS_WITH;
>>> campaignPredicate.values = new String[] { "API" };
>>>
>>> Predicate adPredicate = new Predicate();
>>> adPredicate.field = "AdType";
>>> adPredicate.@operator = PredicateOperator.EQUALS;
>>> adPredicate.values = new String[] { "TEXT_AD" };
>>>
>>> // Create selector.
>>> Selec

Re: NullReferenceException on DownloadReportToStream when downloading ad report

2012-03-27 Thread Joanna
Hi Anash,
I found the reason for the error was the timeout. The value from the app 
config was not used in the request so when I have set it manually it was 
working. I will add this to the issues list.
Best regards,
Joanna

W dniu poniedziałek, 12 marca 2012, 15:36:32 UTC+1 użytkownik Anash P. 
Oommen napisał:
>
> Hi Joanna,
>
> Could you email your app.config (or the line number at which the code 
> fails) to anash.p.oom...@google.com? The code looks perfectly fine, so I 
> suspect it has something to do with the configuration settings.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
> On Thursday, 1 March 2012 22:05:46 UTC+5:30, Joanna wrote:
>>
>> Hello,
>> Since two weeks ago I cannot download the AD REPORT. I am using the API 
>> v201109 and the .net Google.Adwords library version 14. I query using the 
>> following report definition
>>
>> Predicate campaignPredicate = new Predicate();
>> campaignPredicate.field = "CampaignName";
>> campaignPredicate.@operator = PredicateOperator.STARTS_WITH;
>> campaignPredicate.values = new String[] { "API" };
>>
>> Predicate adPredicate = new Predicate();
>> adPredicate.field = "AdType";
>> adPredicate.@operator = PredicateOperator.EQUALS;
>> adPredicate.values = new String[] { "TEXT_AD" };
>>
>> // Create selector.
>> Selector selector = new Selector();
>>
>> selector.fields = new string[] {
>> "Id",
>> "CampaignId",
>> "AdGroupId",
>> "Url",
>> "Description1",
>> "Description2",
>> "Headline", 
>> "DisplayUrl",
>> "Status", 
>> "CampaignStatus",
>> "AdGroupStatus"   
>>
>> };
>>
>> selector.predicates = new Predicate[] { campaignPredicate, 
>> adPredicate };
>>
>> ReportDefinition reportDefinition = new ReportDefinition();
>> reportDefinition.reportName = " " + DateTime.Now;
>> reportDefinition.dateRangeType = 
>> ReportDefinitionDateRangeType.ALL_TIME;
>> reportDefinition.reportType = 
>> ReportDefinitionReportType.AD_PERFORMANCE_REPORT;
>> reportDefinition.downloadFormat = DownloadFormat.GZIPPED_CSV;
>> reportDefinition.selector = selector;
>>
>> I get NullReferenceException. Here is the stacktrace:
>>
>> Exception: System.NullReferenceException: Object reference not set to an 
>> instance of an object.
>>at 
>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String
>>  
>> downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, Stream 
>> outputStream, String postBody)
>>at 
>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToDisk(String
>>  
>> downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, String 
>> path, String postBody)
>>at 
>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T
>>  
>> reportDefinitionOrId, Boolean returnMoneyInMicros, String path)
>>at 
>> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T
>>  
>> reportDefinitionOrId, String path)
>>
>> I would be very gratefull if someone could help me.
>> Joanna
>>
>>
> On Thursday, 1 March 2012 22:05:46 UTC+5:30, Joanna wrote:
>>
>> Hello,
>> Since two weeks ago I cannot download the AD REPORT. I am using the API 
>> v201109 and the .net Google.Adwords library version 14. I query using the 
>> following report definition
>>
>> Predicate campaignPredicate = new Predicate();
>> campaignPredicate.field = "CampaignName";
>> campaignPredicate.@operator = PredicateOperator.STARTS_WITH;
>> campaignPredicate.values = new String[] { "API" };
>>
>> Predicate adPredicate = new Predicate();
>> adPredicate.field = "AdType";
>> adPredicate.@operator = PredicateOperator.EQUALS;
>> adPredicate.values = new String[] { "TEXT_AD" };
>>
>> // Create selector.
>> Selector selector = new Selector();
>>
>> selector.fields = new string[] {
>> "Id",
>> "CampaignId",
>> "AdGroupId",
>> "Url",
>>

Re: NullReferenceException on DownloadReportToStream when downloading ad report

2012-03-12 Thread Anash P. Oommen
Hi Joanna,

Could you email your app.config (or the line number at which the code 
fails) to anash.p.oom...@google.com? The code looks perfectly fine, so I 
suspect it has something to do with the configuration settings.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Thursday, 1 March 2012 22:05:46 UTC+5:30, Joanna wrote:
>
> Hello,
> Since two weeks ago I cannot download the AD REPORT. I am using the API 
> v201109 and the .net Google.Adwords library version 14. I query using the 
> following report definition
>
> Predicate campaignPredicate = new Predicate();
> campaignPredicate.field = "CampaignName";
> campaignPredicate.@operator = PredicateOperator.STARTS_WITH;
> campaignPredicate.values = new String[] { "API" };
>
> Predicate adPredicate = new Predicate();
> adPredicate.field = "AdType";
> adPredicate.@operator = PredicateOperator.EQUALS;
> adPredicate.values = new String[] { "TEXT_AD" };
>
> // Create selector.
> Selector selector = new Selector();
>
> selector.fields = new string[] {
> "Id",
> "CampaignId",
> "AdGroupId",
> "Url",
> "Description1",
> "Description2",
> "Headline", 
> "DisplayUrl",
> "Status", 
> "CampaignStatus",
> "AdGroupStatus"   
>
> };
>
> selector.predicates = new Predicate[] { campaignPredicate, 
> adPredicate };
>
> ReportDefinition reportDefinition = new ReportDefinition();
> reportDefinition.reportName = " " + DateTime.Now;
> reportDefinition.dateRangeType = 
> ReportDefinitionDateRangeType.ALL_TIME;
> reportDefinition.reportType = 
> ReportDefinitionReportType.AD_PERFORMANCE_REPORT;
> reportDefinition.downloadFormat = DownloadFormat.GZIPPED_CSV;
> reportDefinition.selector = selector;
>
> I get NullReferenceException. Here is the stacktrace:
>
> Exception: System.NullReferenceException: Object reference not set to an 
> instance of an object.
>at 
> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String
>  
> downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, Stream 
> outputStream, String postBody)
>at 
> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToDisk(String
>  
> downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, String 
> path, String postBody)
>at 
> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T 
> reportDefinitionOrId, Boolean returnMoneyInMicros, String path)
>at 
> Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T 
> reportDefinitionOrId, String path)
>
> I would be very gratefull if someone could help me.
> Joanna
>
>
On Thursday, 1 March 2012 22:05:46 UTC+5:30, Joanna wrote:
>
> Hello,
> Since two weeks ago I cannot download the AD REPORT. I am using the API 
> v201109 and the .net Google.Adwords library version 14. I query using the 
> following report definition
>
> Predicate campaignPredicate = new Predicate();
> campaignPredicate.field = "CampaignName";
> campaignPredicate.@operator = PredicateOperator.STARTS_WITH;
> campaignPredicate.values = new String[] { "API" };
>
> Predicate adPredicate = new Predicate();
> adPredicate.field = "AdType";
> adPredicate.@operator = PredicateOperator.EQUALS;
> adPredicate.values = new String[] { "TEXT_AD" };
>
> // Create selector.
> Selector selector = new Selector();
>
> selector.fields = new string[] {
> "Id",
> "CampaignId",
> "AdGroupId",
> "Url",
> "Description1",
> "Description2",
> "Headline", 
> "DisplayUrl",
> "Status", 
> "CampaignStatus",
> "AdGroupStatus"   
>   

NullReferenceException on DownloadReportToStream when downloading ad report

2012-03-01 Thread Joanna
Hello,
Since two weeks ago I cannot download the AD REPORT. I am using the API 
v201109 and the .net Google.Adwords library version 14. I query using the 
following report definition

Predicate campaignPredicate = new Predicate();
campaignPredicate.field = "CampaignName";
campaignPredicate.@operator = PredicateOperator.STARTS_WITH;
campaignPredicate.values = new String[] { "API" };

Predicate adPredicate = new Predicate();
adPredicate.field = "AdType";
adPredicate.@operator = PredicateOperator.EQUALS;
adPredicate.values = new String[] { "TEXT_AD" };

// Create selector.
Selector selector = new Selector();

selector.fields = new string[] {
"Id",
"CampaignId",
"AdGroupId",
"Url",
"Description1",
"Description2",
"Headline", 
"DisplayUrl",
"Status", 
"CampaignStatus",
"AdGroupStatus" 
 
};

selector.predicates = new Predicate[] { campaignPredicate, 
adPredicate };

ReportDefinition reportDefinition = new ReportDefinition();
reportDefinition.reportName = " " + DateTime.Now;
reportDefinition.dateRangeType = 
ReportDefinitionDateRangeType.ALL_TIME;
reportDefinition.reportType = 
ReportDefinitionReportType.AD_PERFORMANCE_REPORT;
reportDefinition.downloadFormat = DownloadFormat.GZIPPED_CSV;
reportDefinition.selector = selector;

I get NullReferenceException. Here is the stacktrace:

Exception: System.NullReferenceException: Object reference not set to an 
instance of an object.
   at 
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String
 
downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, Stream 
outputStream, String postBody)
   at 
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToDisk(String 
downloadUrl, AdWordsAppConfig config, Boolean returnMoneyInMicros, String 
path, String postBody)
   at 
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T 
reportDefinitionOrId, Boolean returnMoneyInMicros, String path)
   at 
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T 
reportDefinitionOrId, String path)

I would be very gratefull if someone could help me.
Joanna

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en