Specified type 'google_ads_failure' does not exist in Google Ads API v8

16 views
Skip to first unread message

EladB

unread,
Oct 3, 2021, 1:15:06 PM10/3/21
to AdWords API and Google Ads API Forum
Hello,


I have two issues:

I'm calling G-Ads API to bulk remove ads ([code](https://github.com/google/bowling-compliance-ads-remover/blob/main/src/main.py#L440))

1) I get a partial error
2) And the code fails to parse it (taken form the official [website]( https://developers.google.com/google-ads/api/docs/samples/handle-partial-failure?hl=uk#python))

Thanks!


My terminal shows:

Partial failures occurred. Details will be shown below.

```
Traceback (most recent call last):
  File "D:\projects\bowling\venv\lib\site-packages\google\ads\googleads\client.py", line 426, in get_type
    message_class = getattr(type_classes, name)
  File "D:\projects\bowling\venv\lib\site-packages\google\ads\googleads\v8\__init__.py", line 1753, in __getattr__
    raise AttributeError(f"unknown type {name!r}.")
AttributeError: unknown type 'google_ads_failure'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\projects\bowling\src\main.py", line 535, in <module>
    main(args.top_id)
  File "D:\projects\bowling\src\main.py", line 141, in main
    removed_ads_count = remove_disapproved_ads_for_account(account)
  File "D:\projects\bowling\src\main.py", line 206, in remove_disapproved_ads_for_account
    remove_ads(ad_removal_operations, ads_to_remove_json, account_id)
  File "D:\projects\bowling\src\main.py", line 300, in remove_ads
    index_array, error_array = _print_results(response_chunk)
  File "D:\projects\bowling\src\main.py", line 439, in _print_results
    failure_message = gAdsServiceWrapper.client.get_type("google_ads_failure")
  File "D:\projects\bowling\venv\lib\site-packages\google\ads\googleads\client.py", line 428, in get_type
    raise ValueError(
ValueError: Specified type 'google_ads_failure' does not exist in Google Ads API v8
```

Google Ads API Forum Advisor

unread,
Oct 4, 2021, 5:48:09 PM10/4/21
to adwor...@googlegroups.com
Hi Elad,

We received your private email with the subject by the same name of this thread. Please allow us to continue the correspondence on that thread, as we have requested some private information. 

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2OWGZZ:ref
Reply all
Reply to author
Forward
0 new messages