Hi Dhanya,
I'm having similar issue as Santiago. Please see summary of things I've
already accomplished for my first API Call:
(I'm using Python 3.6 version for API calls.)
*AdWords*
1) I've obtained developer token for test account
2) I've created a test MCC account
3) I've created adowrds account within my test MCC account
4) I've also created campaign, ad groups and keywords within adwords
account
*API Console*
1) I've got up client ID
2) I've got client secret
*Refresh Token*
1) I've successfully obtained refresh token.
*Yaml file:*
1) I've filled the following orange fields (I've starred out my real info
though):
developer_token: **************
#############################################################################
# Optional Fields #
#############################################################################
client_customer_id: ************
# user_agent: INSERT_USER_AGENT_HERE
# partial_failure: True
# validate_only: True
#############################################################################
# OAuth2 Configuration #
# Below you may provide credentials for either the installed application or #
# service account flows. Remove or comment the lines for the flow you're #
# not using. #
#############################################################################
# The following values configure the client for the installed application
# flow.
client_id: 93**************
client_secret: U*********
refresh_token: U*********
*Get Campaigns*
- I'm trying to run get_campaigns.py for my first API call. But I always
receive this error:
charmProjects\Project_1_Test\venv\Scripts\python.exe C:/Users/OYarse01/
PycharmProjects/Project_1_Test/get_campaign.py
WARNING:googleads.common:Your default encoding, cp1252, is not UTF-8. Please
run this script with UTF-8 encoding to avoid errors.
DEBUG:suds.transport.http:opening (https:
//adwords.google.com/api/adwords/cm/v201710/CampaignService?wsdl)
INFO:oauth2client.client:Refreshing access_token
INFO:googleads.common:Request summary - {'methodName': get}
Traceback (most recent call last):
File "C:/Users/OYarse01/PycharmProjects/Project_1_Test/get_campaign.py",
line 69, in <module>
main(adwords_client)
File "C:/Users/OYarse01/PycharmProjects/Project_1_Test/get_campaign.py",
line 52, in main
page = campaign_service.get(selector)
File
"C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\googleads\common.py"
, line 779, in MakeSoapRequest
self._packer) for arg in args])
File
"C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\suds\client.py"
, line 521, in __call__
return client.invoke(args, kwargs)
File
"C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\suds\client.py"
, line 581, in invoke
result = self.send(soapenv)
File
"C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\suds\client.py"
, line 613, in send
reply = self.options.transport.send(request)
File
"C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\googleads\util.py"
, line 121, in PatchedHttpTransportSend
suds.transport.http.log.debug('sending:\n%s', request)
File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 1289, in
debug
self._log(DEBUG, msg, args, **kwargs)
File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 1437, in
_log
self.handle(record)
File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 1446, in
handle
if (not self.disabled) and self.filter(record):
File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 713, in
filter
result = f.filter(record)
File
"C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\googleads\util.py"
, line 302, in filter
self._REDACTED, msg)
TypeError: cannot use a string pattern on a bytes-like object
Process finished with exit code 1
I would appreciate your help on this.
Thanks,
Olek
On Monday, February 19, 2018 at 4:45:21 PM UTC, Dhanya Sundararaju (AdWords
API Team) wrote:
>
> Hi,
>
> I was able to pull up your account 737-186-2754. Looks like it is not a
> test account. You also would need a test manager account to use the API
> until your Production Developer Token is approved. Please refer this
> <https://developers.google.com/adwords/api/docs/guides/first-api-call#create_test_accounts>
> guide
> for steps on how to create test accounts. Also, could you let me know the
> MCC id of the Developer token used in your googleads.yaml file? Please let
> me know if you have further questions.
>
> Regards,
> Dhanya, AdWords API Team
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/2b3439ce-8185-4f46-ad23-ce1f5e2910fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.