Repository navigation
Conversation
There was a problem hiding this comment.
SearchPagedResponse does not exist in google.ads.googleads.v26.services.types.google_ads_service and raises an ImportError at runtime. GoogleAdsServiceClient.search() returns a SearchPager:
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| SearchPagedResponse, | |
| GoogleAdsRow, | |
| ) | |
| from google.ads.googleads.v26.services.services.google_ads_service.pagers import ( | |
| SearchPager, | |
| ) | |
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| GoogleAdsRow, | |
| ) |
| from google.ads.googleads.v26.services.types.google_ads_service import ( | ||
| SearchGoogleAdsRequest, | ||
| SearchPagedResponse, | ||
| GoogleAdsRow, | ||
| ) |
There was a problem hiding this comment.
SearchPagedResponse does not exist in google.ads.googleads.v26.services.types.google_ads_service and raises an ImportError at runtime. Import SearchPager from google.ads.googleads.v26.services.services.google_ads_service.pagers instead:
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| SearchGoogleAdsRequest, | |
| SearchPagedResponse, | |
| GoogleAdsRow, | |
| ) | |
| from google.ads.googleads.v26.services.services.google_ads_service.pagers import ( | |
| SearchPager, | |
| ) | |
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| SearchGoogleAdsRequest, | |
| GoogleAdsRow, | |
| ) |
| from google.ads.googleads.v26.services.types.google_ads_service import ( | ||
| SearchGoogleAdsRequest, | ||
| SearchPagedResponse, | ||
| GoogleAdsRow, | ||
| ) |
There was a problem hiding this comment.
SearchPagedResponse does not exist in google.ads.googleads.v26.services.types.google_ads_service and raises an ImportError at runtime. Import SearchPager from google.ads.googleads.v26.services.services.google_ads_service.pagers instead:
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| SearchGoogleAdsRequest, | |
| SearchPagedResponse, | |
| GoogleAdsRow, | |
| ) | |
| from google.ads.googleads.v26.services.services.google_ads_service.pagers import ( | |
| SearchPager, | |
| ) | |
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| SearchGoogleAdsRequest, | |
| GoogleAdsRow, | |
| ) |
| from google.ads.googleads.v26.services.types.google_ads_service import ( | ||
| SearchPagedResponse, | ||
| GoogleAdsRow, | ||
| ) |
There was a problem hiding this comment.
SearchPagedResponse does not exist in google.ads.googleads.v26.services.types.google_ads_service and raises an ImportError at runtime. Import SearchPager from google.ads.googleads.v26.services.services.google_ads_service.pagers instead.
Also note: MutateCustomerClientLinkResponse (imported on line 30) has a singular .result field in v26 rather than .results, so response.results[0].resource_name on line 86 will raise an AttributeError (should be response.result.resource_name).
| from google.ads.googleads.v26.services.types.google_ads_service import ( | ||
| SearchGoogleAdsRequest, | ||
| SearchPagedResponse, | ||
| ) |
There was a problem hiding this comment.
SearchPagedResponse does not exist in google.ads.googleads.v26.services.types.google_ads_service and raises an ImportError at runtime. Import SearchPager from google.ads.googleads.v26.services.services.google_ads_service.pagers instead:
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| SearchGoogleAdsRequest, | |
| SearchPagedResponse, | |
| ) | |
| from google.ads.googleads.v26.services.services.google_ads_service.pagers import ( | |
| SearchPager, | |
| ) | |
| from google.ads.googleads.v26.services.types.google_ads_service import ( | |
| SearchGoogleAdsRequest, | |
| ) |
| GoogleAdsServiceClient, | ||
| ) | ||
| from google.ads.googleads.v24.services.types import * | ||
| from google.ads.googleads.v26.services.types import * |
There was a problem hiding this comment.
Avoid wildcard imports (import *) per the Google Python Style Guide, especially on services.types which loads hundreds of protobuf classes into the module namespace. Explicitly import the operation/response types used in this example instead.
| from google.ads.googleads.v26.services.types.google_ads_service import ( | ||
| MutateGoogleAdsResponse, | ||
| MutateOperation, | ||
| MutateOperationResponse, |
There was a problem hiding this comment.
MutateOperationResponse is imported here but unused in this file.
|
|
||
| from google.protobuf import field_mask_pb2 | ||
| from google.ads.googleads.v24.resources.types import youtube_video_upload | ||
| from google.ads.googleads.v26.resources.types import youtube_video_upload |
There was a problem hiding this comment.
youtube_video_upload (line 52), GoogleAdsRow (line 35), and UpdateYouTubeVideoUploadRequest / UpdateYouTubeVideoUploadResponse / RemoveYouTubeVideoUploadRequest / RemoveYouTubeVideoUploadResponse (lines 45–48) are unused in this file and can be removed.
| from google.ads.googleads.v26.services.types.google_ads_service import ( | ||
| GoogleAdsRow, | ||
| ) |
There was a problem hiding this comment.
GoogleAdsRow is imported here but unused in this file.
There was a problem hiding this comment.
GoogleAdsRow is imported here but unused in this file.

No description provided.