Function 'generate_historical_metrics' failed with error: 'KeywordPlanServiceClient' object has no attribute 'generate_historical_metrics'

49 views
Skip to first unread message

Hans Monfared

unread,
Feb 7, 2024, 1:43:37 AM2/7/24
to Google Ads API and AdWords API Forum
My code which has been working well for more than a year started failing since yesterday.
I am trying to generate historical metrics for a keyword plan.

here is my code:
keyword_plan = self.create_keyword_plan()
....
keyword_plan_service = self.client.get_service("KeywordPlanService")
    response = keyword_plan_service.generate_historical_metrics(
      keyword_plan=keyword_plan)

when the line above being executed, I get the following error:
Function 'generate_historical_metrics' failed with error: 'KeywordPlanServiceClient' object has no attribute 'generate_historical_metrics'

Nothing has changed in our code
I tried v14 and v15 and both has the same issue.
We are using python library version 23.0.0 of google-ads

Has anyone else faced this isse? appreciate if someone  help me on this?

Google Ads API Forum Advisor

unread,
Feb 7, 2024, 3:11:03 AM2/7/24
to ha...@gethostai.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are facing issues while trying to generate historical metrics for Keyword plan through the API. I would recommend you refer to this Generate Historical Metrics guide for more information related to your concern.

In order to assist you further, please provide us the complete API logs (request and response with request-id and request header) generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rytcq:ref"

Thanks,
 
Google Logo Google Ads API Team


Google Ads API Forum Advisor

unread,
Feb 7, 2024, 3:13:14 AM2/7/24
to ha...@gethostai.com, adwor...@googlegroups.com
Hi,

Please ignore my previous response.


Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are facing issues while trying to generate historical metrics for Keyword plan through the API. I would recommend you refer to this Generate Historical Metrics guide for more information related to your concern.

In order to assist you further, please provide us the complete API logs (request and response with request-id and request header) generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
Reply all
Reply to author
Forward
0 new messages