v2 Deprecation Errors

66 views
Skip to first unread message

Sarah Krasnik

unread,
Oct 29, 2020, 5:11:39 PM10/29/20
to AdWords API and Google Ads API Forum
Hello, 

Since v2 has been sunset, I am trying to use a higher google ads API version using the google-ads python client. Below is the code snippet I'm using:

client = google.ads.google_ads.client.GoogleAdsClient(creds, dev_token)
ga_service = client.get_service('GoogleAdsService')

I have tried provide a 'v5' argument to the client.get_service() call, but it says the only possible versions as v1 and v2. I have also tried pip uninstalling and reinstalling the google-ads package (installs to google-ads==4.0.0), with the same error.

What do I need to do to use a higher version after v2?

Thank you in advance.

Google Ads API Forum Advisor Prod

unread,
Nov 2, 2020, 12:01:24 PM11/2/20
to sa...@perpay.com, adwor...@googlegroups.com
Hi Sarah,

You can use this migration guide which should help you migrate out of v2 and onto newer versions of the API. 

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony Madrigal
Google Ads API Team
 


ref:_00D1U1174p._5004Q275mA4:ref
Message has been deleted

sarah

unread,
Nov 2, 2020, 2:29:56 PM11/2/20
to AdWords API and Google Ads API Forum
Hello, could you please be more specific? I use the GoogleAdsService and the .search() functionality, but am getting an error when I provide "v5" as the version. What would be the cause of that behavior?

Google Ads API Forum Advisor Prod

unread,
Nov 3, 2020, 2:36:06 PM11/3/20
to sa...@perpay.com, adwor...@googlegroups.com

Hi Sarah,

Can you please share the full request and response for this error? You also received this error while trying to reinstall using the newest version?



Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q275mA4:ref

sarah

unread,
Nov 3, 2020, 4:02:13 PM11/3/20
to AdWords API and Google Ads API Forum
It looks like I had to upgrade my entire Python ecosystem to 3.7 (I was previously on 3.6). That wasn't something I expected since Python 3.6 isn't sunset yet!

Google Ads API Forum Advisor Prod

unread,
Nov 4, 2020, 10:28:41 AM11/4/20
to sa...@perpay.com, adwor...@googlegroups.com
Hi Sarah,

Glad you were able to find the root to your issue. Please let me know if you run into any other issues.

Cheers,
Reply all
Reply to author
Forward
0 new messages