Nevermind what a said above. The file does exist ~ I saw the code base, and the *errors_pb2* module exists only on google_ads.V1. This module does not exists on google_ads.V2 ~
On Tuesday, January 7, 2020 at 11:25:39 AM UTC-3, Lucas Gomide wrote: > > I have the same issue, none examples of queries works. > > I saw the code base, and the *errors_pb2* module exists only on > google_ads.V1. This module does not exists on google_ads.V2. > > I'm trying to fix it since yesterday. There is an issue on Github as well > https://github.com/googleads/google-ads-python/issues/200 > > On Tuesday, January 7, 2020 at 11:19:29 AM UTC-3, Drew Lauck wrote: >> >> Good morning, >> >> Currently using the python client library ( >> https://github.com/googleads/google-ads-python) and running the >> get_keyword_stats.py ( >> https://github.com/googleads/google-ads-python/blob/master/examples/reporting/get_keyword_stats.py). >> >> I've been able to successfully pull data and send it to a remote database >> when using this query provided in the Github repo: >> >> query = ('SELECT campaign.id, campaign.name, ad_group.id, ad_group.name >> , ' >> 'ad_group_criterion.criterion_id, ' >> 'ad_group_criterion.keyword.text, ' >> 'ad_group_criterion.keyword.match_type, ' >> 'metrics.impressions, metrics.clicks, metrics.cost_micros ' >> 'FROM keyword_view WHERE segments.date DURING LAST_30_DAYS ' >> 'AND campaign.advertising_channel_type = \'SEARCH\' ' >> 'AND ad_group.status = \'ENABLED\' ' >> 'AND ad_group_criterion.status IN (\'ENABLED\', \'PAUSED\' >> ) ' >> 'ORDER BY metrics.impressions DESC ' >> ) >> >> >> The data is fine and looks like it's displaying correctly but when I add >> more data to request in this query: >> >> query = ('SELECT campaign.id, campaign.name, ad_group.id, ad_group.name >> , ' >> 'ad_group_criterion.criterion_id, ' >> 'ad_group_criterion.keyword.text, ' >> 'ad_group_criterion.keyword.match_type, ' >> >> 'metrics.impressions, metrics.clicks, metrics.cost_micros, >> metrics.absolute_top_impression_percentage, metrics.average_cost, >> metrics.average_cpc, metrics.average_cpm, metrics.engagement_rate' >> >> 'FROM keyword_view WHERE segments.date DURING LAST_30_DAYS ' >> 'AND campaign.advertising_channel_type = \'SEARCH\' ' >> 'AND ad_group.status = \'ENABLED\' ' >> 'AND ad_group_criterion.status IN (\'ENABLED\', \'PAUSED\' >> ) ' >> 'ORDER BY metrics.impressions DESC ' >> ) >> >> I get an error provided here: >> >> Traceback (most recent call last): >> File "get_keyword_stats.py", line 57, in main >> for row in response: >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\page_iterator.py", >> >> line 212, in _items_iter >> for page in self._page_iter(increment=False): >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\page_iterator.py", >> >> line 243, in _page_iter >> page = self._next_page() >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\page_iterator.py", >> >> line 534, in _next_page >> response = self._method(self._request) >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\gapic_v1\method.py", >> >> line 143, in __call__ >> return wrapped_func(*args, **kwargs) >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\retry.py", >> >> line 281, in retry_wrapped_func >> return retry_target( >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\retry.py", >> >> line 184, in retry_target >> return target() >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\timeout.py", >> >> line 214, in func_with_timeout >> return func(*args, **kwargs) >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\api_core\grpc_helpers.py", >> >> line 57, in error_remapped_callable >> return callable_(*args, **kwargs) >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 216, in __call__ >> response, ignored_call = self._with_call( >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 257, in _with_call >> return call.result(), call >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 126, in result >> raise self._exception >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 242, in continuation >> response, call = self._thunk(new_method).with_call( >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 266, in with_call >> return self._with_call( >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 257, in _with_call >> return call.result(), call >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 126, in result >> raise self._exception >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 242, in continuation >> response, call = self._thunk(new_method).with_call( >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 266, in with_call >> return self._with_call( >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\grpc\_interceptor.py", >> >> line 255, in _with_call >> call = self._interceptor.intercept_unary_unary( >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\ads\google_ads\interceptors\exception_interceptor.py", >> >> line 139, in intercept_unary_unary >> self._handle_grpc_failure(response) >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\ads\google_ads\interceptors\exception_interceptor.py", >> >> line 105, in _handle_grpc_failure >> google_ads_failure = self._get_google_ads_failure(trailing_metadata) >> File "C:\Users\Drew >> Lauck\AppData\Local\Programs\Python\Python38\lib\site-packages\google\ads\google_ads\interceptors\exception_interceptor.py", >> >> line 68, in _get_google_ads_failure >> ga_failure = error_protos.errors_pb2.GoogleAdsFailure() >> AttributeError: module 'google.ads.google_ads.v2.proto.errors' has no >> attribute 'errors_pb2' >> >> >> The script is very inconsistent because it's run before with no errors >> and data was able to be pulled and pushed into MySQL. Is there a limit to >> the amount of data I can request in a query or is there a limit for >> requests? I went through the keyword_view report ( >> https://developers.google.com/google-ads/api/fields/v2/keyword_view) and >> verified all the data I'm requesting can be pulled from this report. If >> you've run into this problem, know about a workaround or know anything >> about these specific errors, please let me know! >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/6d3299d4-446d-4987-9c79-9b59259eaf35%40googlegroups.com.