在 2020年2月24日星期一 UTC+8下午6:10:48,猫头木有鹰写道:
>
>  File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/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'
>  
> File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/ads/google_ads/interceptors/exception_interceptor.py",
>  
> line 68, in _get_google_ads_failure
>
> Change like this bellow, then it works!
>
>
if trailing_metadata is not None:
    for kv in trailing_metadata:
        if kv[0] == self._failure_key:
            try:
                # ↓↓↓↓↓↓↓
                errors_pb2 = 
import_module('google.ads.google_ads.%s.proto.errors.errors_pb2' 
%self._api_version)
                # ↑↑↑↑↑↑↑
                ga_failure = errors_pb2.GoogleAdsFailure()
                ga_failure.ParseFromString(kv[1])
                return ga_failure
            except DecodeError:
                return None

return None 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/81dfd835-49da-4a6b-ab19-87b1ebefbe81%40googlegroups.com.

Reply via email to