问题描述
我每天都有一个Python脚本,可以从Google Ads API中提取数据。我安装了Google Ads Library的v20.0.0。 10月28日,它开始失败并出现以下错误:
Error with message " Version v2 is deprecated. Requests to this version will be blocked."
我认为这是因为以下设置行:
ga_service = client.get_service('GoogleAdsService',version='v2')
但是当我将其更改为v3
时(只是一个猜测,因为错误消息没有告诉我接受了什么版本),因此在运行脚本时会得到以下提示:
ValueError: Specified Google Ads API version "v3" does not exist. Valid API versions are: "v2","v1"
我运行了pip install --upgrade googleads
,这使我达到v25.0.0
,但仍然遇到相同的错误。然后,我卸载并重新安装了googleads
,但仍然遇到相同的错误。
我在Google文档中找不到迁移指南。有谁知道如何更新软件包和脚本以使其再次运行?