Google Ads API Error for get_ad_groups

692 views
Skip to first unread message

Prasad Biruduraju

unread,
Jun 3, 2021, 2:07:58 PM6/3/21
to AdWords API and Google Ads API Forum
Hi, 

Tried to run get_ad_groups,py from the examples in googleads python library and got the error message below.

Can you please help me know of a way to correct it.

thanks,
Prasad

$ python3.6 get_ad_groups.py --customer_id 

Traceback (most recent call last):

  File "get_ad_groups.py", line 88, in <module>

    campaign_id=args.campaign_id,

  File "get_ad_groups.py", line 28, in main

    ga_service = client.get_service("GoogleAdsService")

  File "/usr/local/lib/python3.6/site-packages/google/ads/googleads/client.py", line 378, in get_service

    options=_GRPC_CHANNEL_OPTIONS,

  File "/usr/local/lib/python3.6/site-packages/google/ads/googleads/v7/services/services/google_ads_service/transports/grpc.py", line 202, in create_channel

    **kwargs,

  File "/usr/local/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 311, in create_channel

    default_host=default_host,

  File "/usr/local/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 238, in _create_composite_credentials

    default_scopes=default_scopes

TypeError: with_scopes_if_required() got an unexpected keyword argument 'default_scopes'



Google Ads API Forum Advisor Prod

unread,
Jun 4, 2021, 2:26:07 AM6/4/21
to adwor...@googlegroups.com

Hello Prasad,

Thank you for reaching out to us.

Please note that this forum channel can only provide assistance to issues/concerns related to the AdWords API / Google Ads API.

Have you tried following this guide when configuring your API environment using the Python client library? As for the errors encountered using the Python client library, we highly recommend that you reach out to the author of the client library via this link instead.

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


ref:_00D1U1174p._5004Q2I01Vu:ref

jahang...@gmail.com

unread,
Jun 10, 2021, 10:44:45 PM6/10/21
to AdWords API and Google Ads API Forum
Hi Prasad

I was facing the same issue, and it comes out to be the problem with the google API core pip package, added explicitly following in my requirements file google-api-core==1.30.0 fixed the same issue for me. 

THanks

Google Ads API Forum Advisor

unread,
Jun 13, 2021, 11:09:47 PM6/13/21
to jahang...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for your follow up and update in this thread.

For concerns and discussions related to the Python client library and its setup, our recommendation would be to reach out directly to the client library owners, via this link, for further guidance.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


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