``` Request: customer_id: "3061188621" query: "\n        SELECT 
keyword_plan.name, keyword_plan.id, keyword_plan.forecast_period, 
keyword_plan.resource_name\n         FROM keyword_plan\n    " Response 
------- Headers: {   "request-id": "BCdYO650uz-nWxPZgWatkg" } Response: 
None`

Attaching log file.

On Saturday, February 11, 2023 at 12:02:31 AM UTC+5:30 Google Ads API and 
AdWords API Forum wrote:

> Hi,
>
> We are glad to assist you. With regards to concern, can you please provide 
> us with the complete request 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
>  and response 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
>  logs 
> with request ID 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>,
>  
> so that our team can better check and can provide the right recommendation 
> or solution?
>
> Note that the logs can be requested or provided to the developer handling 
> the Google Ads API transactions when logging of the API requests has been 
> enabled. You may check here 
> <https://developers.google.com/google-ads/api/docs/best-practices/logging#python>
>  for 
> the Python client library.
>
> You may then send the requested logs via the *Reply privately to author* 
> option. If this option is not available, you may send the details directly 
> to our [email protected] alias instead.
>
> Regards,
> Carmela
> Google Ads API Team
> On Friday, February 10, 2023 at 4:51:08 PM UTC+8 
> [email protected] wrote:
>
>> hello google team,
>>
>> we are following this documention 
>> https://developers.google.com/google-ads/api/samples/add-keyword-plan,
>>
>> we are getting this error :
>> --------------------------------------------------------------------------- 
>> TypeError Traceback (most recent call last) Cell In[49], line 2 * 1* 
>> geo_target.geo_target_constant = "geoTargetConstants/5" ----> 2 
>> keyword_plan_campaign.geo_targets.append(geo_target) TypeError: Parameter 
>> to MergeFrom() must be instance of same class: expected 
>> google.ads.googleads.v12.resources.KeywordPlanGeoTarget got 
>> KeywordPlanGeoTarget.
>>
>> python version : Python 3.10.6
>> type(keyword_plan_campaign) : 
>>
>> google.ads.googleads.v12.resources.types.keyword_plan_campaign.KeywordPlanCampaign
>> type(geo_target)
>>
>> google.ads.googleads.v12.resources.types.keyword_plan_campaign.KeywordPlanGeoTarget
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/1615d8ea-c6fe-453f-9abf-804d0df8df39n%40googlegroups.com.
[2023-02-21 15:58:08,490 - DEBUG] Making request: POST 
https://accounts.google.com/o/oauth2/token
[2023-02-21 15:58:08,494 - DEBUG] Starting new HTTPS connection (1): 
accounts.google.com:443
[2023-02-21 15:58:08,689 - DEBUG] https://accounts.google.com:443 "POST 
/o/oauth2/token HTTP/1.1" 200 None
[2023-02-21 15:58:09,065 - DEBUG] Request
-------
Method: /google.ads.googleads.v12.services.KeywordPlanService/MutateKeywordPlans
Host: googleads.googleapis.com
Headers: {
  "developer-token": "REDACTED",
  "x-goog-api-client": "gl-python/3.10.6 grpc/1.50.0 gax/2.10.1 gccl/19.0.0 
pb/4.21.9+c",
  "x-goog-request-params": "customer_id=3061188621"
}
Request: customer_id: "3061188621"
operations {
  create {
    forecast_period {
      date_interval: NEXT_QUARTER
    }
    name: "Keyword plan for traffic estimate 
013509b7-6ecd-42b4-abab-916797bfe440"
  }
}


Response
-------
Headers: {
  "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
  "content-disposition": "attachment",
  "date": "Tue, 21 Feb 2023 10:28:09 GMT",
  "request-id": "KgEcEIvI7kZlqr_ITit-Uw"
}
Response: results {
  resource_name: "customers/3061188621/keywordPlans/618743801"
}


[2023-02-21 15:58:09,065 - INFO] Request made: ClientCustomerId: 3061188621, 
Host: googleads.googleapis.com, Method: 
/google.ads.googleads.v12.services.KeywordPlanService/MutateKeywordPlans, 
RequestId: KgEcEIvI7kZlqr_ITit-Uw, IsFault: False, FaultMessage: None
[2023-02-21 15:58:10,646 - ERROR] Internal Server Error: /search-volume/
Traceback (most recent call last):
  File 
"/home/seo/seoenv/lib/python3.10/site-packages/django/core/handlers/exception.py",
 line 55, in inner
    response = get_response(request)
  File 
"/home/seo/seoenv/lib/python3.10/site-packages/django/core/handlers/base.py", 
line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seo/seo-tools/web_analytics/views.py", line 108, in searchvolume
    context = functions.SearchvolumeOperation(keyword)
  File "/home/seo/seo-tools/web_analytics/functions.py", line 203, in 
SearchvolumeOperation
    keywordplan_id = sv_puller(keywordlist)
  File "/home/seo/seo-tools/web_analytics/auth/add_keyword_plan.py", line 312, 
in sv_puller
    main(googleads_client, "3061188621", keyword_list)
  File "/home/seo/seo-tools/web_analytics/auth/add_keyword_plan.py", line 41, 
in main
    add_keyword_plan(client, customer_id,keyword_list)
  File "/home/seo/seo-tools/web_analytics/auth/add_keyword_plan.py", line 55, 
in add_keyword_plan
    keyword_plan_campaign = create_keyword_plan_campaign(
  File "/home/seo/seo-tools/web_analytics/auth/add_keyword_plan.py", line 136, 
in create_keyword_plan_campaign
    keyword_plan_campaign.geo_targets.append(geo_target)
TypeError: Parameter to MergeFrom() must be instance of same class: expected 
google.ads.googleads.v12.resources.KeywordPlanGeoTarget got 
KeywordPlanGeoTarget.
[2023-02-21 15:58:10,654 - ERROR] "POST /search-volume/ HTTP/1.1" 500 92491
  • Re: TypeError: Pa... Google Ads API and AdWords API Forum
    • Re: TypeErro... 'Rohini Mishra' via Google Ads API and AdWords API Forum

Reply via email to