google-ads.yaml looks like HTML

398 views
Skip to first unread message

Max Andriichuk

unread,
Feb 11, 2022, 12:32:40 PM2/11/22
to Google Ads API and AdWords API Forum
Greetings.

As I understand from description, file  google-ads.yaml is needed to keep my personal keys info separate. I downloaded it from https://github.com/googleads/google-ads-python and tryed to open with PyCharm 2021.3.2 (Community Edition). Was expecting to see phyton code in it, but instead I got something like HTMLcode(screenshot attached). Please advice what is wrong?

Best regards,
Max
googleads.yaml.jpg

Google Ads API Forum Advisor

unread,
Feb 14, 2022, 3:32:16 AM2/14/22
to max.and...@laba.academy, adwor...@googlegroups.com

Hi Max,

Thanks for reaching out to the Google Ads API Forum.

Kindly note that PyCharm is an IDE, and said concern of not being able to open the google-ads.yaml file in PyCharm is not API related. You may consider opening your concern about PyCharm on the forums (such as StackOverflow) for further assistance on your concern. 

Let us know if you have any further questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 

 

 



ref:_00D1U1174p._5004Q2W6Ufq:ref

Max Andriichuk

unread,
Feb 14, 2022, 5:13:25 AM2/14/22
to Google Ads API and AdWords API Forum
Good afternoon, Yasar.

Thanks for your clarification. Fortunately I found the way Configuration using a dict. Now trying to use example code from Github. 
As I understand, the request code looks like SQL, but it is "commented'' in code. When I try remove commenting symbols and get simple campaign.id and campaign.name with SELECT, the query is not recognized(screenshot is attached). 
Tried to put whole request in one line as an example (query = SELECT campaign.idcampaign.name FROM campaign ORDER BY campaign.id) also doesn't help. Please advise how I can make my first API call?

Best regards
Max
get_campaigns.jpg

Max Andriichuk

unread,
Feb 14, 2022, 9:28:44 AM2/14/22
to Google Ads API and AdWords API Forum
Dear, Yasar,

To make it more clear, I tryed to launch simple  get_campaigns   script (on https://github.com/googleads/google-ads-python/blob/main/examples/basic_operations/get_campaigns.py).
I am creating credentials not with google-ads.yaml but with  Configuration using a dict. I changed code with credentials for example below, but still get Error that I cannot undertand(on screenshot).
Please need yiour assitance.

if __name__ == "__main__":
    # GoogleAdsClient will read the google-ads.yaml configuration file in the
    # home directory if none is specified.
#     googleads_client = GoogleAdsClient.load_from_storage(version="v9")
    googleads_client = GoogleAdsClient.load_from_dict(credentials)

    parser = argparse.ArgumentParser(
        description="Lists all campaigns for specified customer."
    )
    # The following argument(s) should be provided to run the example.
    parser.add_argument(
        "-c",
        "--customer_id",
        type=str,
        required=True,
        help="The Google Ads customer ID.",
    )
    args = parser.parse_args()
 

get_campaigns3.jpg

Max Andriichuk

unread,
Feb 14, 2022, 9:34:22 AM2/14/22
to Google Ads API and AdWords API Forum
In addition, kindly see attached screenshot. If I  "%tb" the Error described in message above, I get full description(file attached).
get_campaigns4.jpg

Google Ads API Forum Advisor

unread,
Feb 15, 2022, 5:04:47 AM2/15/22
to max.and...@laba.academy, adwor...@googlegroups.com

Hi Max,

Thanks for getting back to us.

Could you please confirm if you were able to complete installation and configuration for the Python client library configuration? If so, and you are encountering an API error, you may provide us with the complete request and response logs, with the request-id, generated so that our team can check better. You can enable logging, which you may do by following this link.

If you’re unable to follow the complete installation and configuration on jupyter, then I recommend you to reach out to the Python client library owner by filing an issue on the issue tracker on the Issue tab of your client library on github, so that they can provide guidance on it.  

Regards,

Reply all
Reply to author
Forward
0 new messages