Re: 'ReflectionException' while using ReportUtils in Adwords API v201605

2018-04-18 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API Forum
Hi Ray,

Please refer highlighted section of this code sample 

 to check out how to set includeZeroImpressions. If not already aware, you 
may refer this section of the guide 

 for more details. Also, since this thread is quite old, could you please 
create a new thread if you have any further questions?

Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ca9c43d1-a9de-4382-8ff3-9e7407794afb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'ReflectionException' while using ReportUtils in Adwords API v201605

2018-04-18 Thread Ray Chang
how to set includeZeroImpressions header  ?

在 2016年8月17日星期三 UTC+8上午1:06:27,Shwetha Vastrad (AdWords API Team)写道:
>
> Hi,
>
> Search Query Performance Report 
> 
>  doesn't 
> support zero impressions. Setting the includeZeroImpressions header to true 
> will result in ReportDownloadError.ZERO_IMPRESSIONS_REQUEST_NOT_SUPPORTED 
> .
>  
> This is most likely the reason for the exception you encountered. 
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/dff79c12-01b4-4449-843a-9a1b819add0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'ReflectionException' while using ReportUtils in Adwords API v201605

2016-08-16 Thread 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
Hi Foluso, 

Are you using the examples provided in the PHP client library 
? The report download 
example has try-catch block to handle errors or exceptions that occur while 
executing the requests. The ReflectionException maybe due to something 
specific in the client environment. I would suggest that you post this 
issue in the PHP library's repository 
 as they are better 
equipped to address this.

Regards,
Shwetha, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/82679430-3886-49f8-b581-b660d3e3587c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'ReflectionException' while using ReportUtils in Adwords API v201605

2016-08-16 Thread Foluso Ogunlana
Oh wow okay.

That's great, thank you very much!

It's great that it gives a helpful error, maybe it could be improved if the
message could bubble up enough to be in the stack trace?

I say this because I spent a lot of time hunting it down, and if I had seen
a single ZERO_IMPRESSIONS_NOT_SUPPORTED, it would have been obvious to me.

I can imagine other developers running into that.

Perhaps I just missed the error message and I should be looking somewhere
else?

Thanks
Foluso



On Tue, Aug 16, 2016 at 6:06 PM 'Shwetha Vastrad (AdWords API Team)' via
AdWords API Forum  wrote:

> Hi,
>
> Search Query Performance Report
> 
>  doesn't
> support zero impressions. Setting the includeZeroImpressions header to true
> will result in ReportDownloadError.ZERO_IMPRESSIONS_REQUEST_NOT_SUPPORTED
> .
> This is most likely the reason for the exception you encountered.
>
> Regards,
> Shwetha, AdWords API Team.
>
> --
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and Google+:
> https://googleadsdeveloper.blogspot.com/
> https://plus.google.com/+GoogleAdsDevelopers/posts
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> 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
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "AdWords API Forum" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/adwords-api/QbZ5pe4sTeA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> adwords-api+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/adwords-api/0941eab0-0930-4918-84d4-f87505837d7a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAGSMpfnbPyqghzLdh4%3DjwwfXFpCdJypW7fqYust-kzNbw7n3MQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'ReflectionException' while using ReportUtils in Adwords API v201605

2016-08-16 Thread 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
Hi,

Search Query Performance Report 

 doesn't 
support zero impressions. Setting the includeZeroImpressions header to true 
will result in ReportDownloadError.ZERO_IMPRESSIONS_REQUEST_NOT_SUPPORTED 
.
 
This is most likely the reason for the exception you encountered. 

Regards,
Shwetha, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0941eab0-0930-4918-84d4-f87505837d7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'ReflectionException' while using ReportUtils in Adwords API v201605

2016-08-16 Thread foluso
I've found the problem that caused this.

It was the include zero impressions flag. 

Not setting it gets rid of the bug. 

Why is that?

On Tuesday, August 16, 2016 at 1:40:31 PM UTC+1, 
fol...@brainlabsdigital.com wrote:
>
> Hi,
>
> I am trying to use the Adwords PHP API ReportUtils object. 
>
> Here is the code:
>
> $util = new ReportUtils();
> // Download report.
> $report = $util->DownloadReport($reportDefinition, null, 
> $this->adwordsClient, $options);
>
>
> The same code works perfectly on the CAMPAIGN_PERFORMANCE_REPORT and on 
> any other report. 
>
> However it doesn't work on the SEARCH_QUERY_PERFORMANCE_REPORT
>
> I had it working previously, but now every time I try to run this code I 
> get the following stack trace:
>
> PHP Notice:  Undefined index: type in 
> /home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php
>  
> on line 136
> PHP Fatal error:  Uncaught exception 'ReflectionException' with message 
> 'Property  does not exist' in 
> /home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php:138
> Stack trace:
> #0 
> /home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php(138):
>  
> ReflectionClass->getProperty('')
> #1 
> /home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php(92):
>  
> XmlDeserializer->ConvertElementToObject(Object(DOMElement), 'ApiError')
> #2 
> /home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php(63):
>  
> XmlDeserializer->ConvertElementToObject(Object(DOMElement))
> #3 
> /home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/v201605/ReportUtilsDelegate.php(194):
>  
> XmlDeserializer-> in 
> /home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php
>  
> on line 138
>
> Does anyone know what I could be doing wrong please?
>
> Like I said before, the only thing I change that produces the error, is 
> the name of the report. 
>
> Assume I am passing in no predicates, and only the 'AdGroupId' field into 
> the selector. 
>
> Thanks
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d96088cb-b0c1-4d10-bf5b-24e4f566c20e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


'ReflectionException' while using ReportUtils in Adwords API v201605

2016-08-16 Thread foluso
Hi,

I am trying to use the Adwords PHP API ReportUtils object. 

Here is the code:

$util = new ReportUtils();
// Download report.
$report = $util->DownloadReport($reportDefinition, null, 
$this->adwordsClient, $options);


The same code works perfectly on the CAMPAIGN_PERFORMANCE_REPORT and on any 
other report. 

However it doesn't work on the SEARCH_QUERY_PERFORMANCE_REPORT

I had it working previously, but now every time I try to run this code I 
get the following stack trace:

PHP Notice:  Undefined index: type in 
/home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php
 
on line 136
PHP Fatal error:  Uncaught exception 'ReflectionException' with message 
'Property  does not exist' in 
/home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php:138
Stack trace:
#0 
/home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php(138):
 
ReflectionClass->getProperty('')
#1 
/home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php(92):
 
XmlDeserializer->ConvertElementToObject(Object(DOMElement), 'ApiError')
#2 
/home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php(63):
 
XmlDeserializer->ConvertElementToObject(Object(DOMElement))
#3 
/home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/v201605/ReportUtilsDelegate.php(194):
 
XmlDeserializer-> in 
/home/foluso/Documents/webProgramming/projects/sqrt/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Util/XmlDeserializer.php
 
on line 138

Does anyone know what I could be doing wrong please?

Like I said before, the only thing I change that produces the error, is the 
name of the report. 

Assume I am passing in no predicates, and only the 'AdGroupId' field into 
the selector. 

Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d693ae9e-51b7-4ecb-9fd8-4bbcf750af23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.