Error API

55 views
Skip to first unread message

sant...@madketing.com.ar

unread,
Mar 14, 2018, 3:29:40 PM3/14/18
to AdWords API Forum
Hello! I am starting to work with the Adwords API in Python, using the Pycharm IDE.
When I execute any of the examples, the following appears BEFORE the result of the code: 
WARNING:googleads.common:Your default encoding, cp1252, is not UTF-8. Please run this script with UTF-8 encoding to avoid errors.
INFO:oauth2client.client:Refreshing access_token
INFO:googleads.common:Request summary - {'methodName': get, 'clientCustomerId': 406-736-8627}
DEBUG:suds.transport.http:sending:
HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': b'""', 'Authorization': 'REDACTED', 'Content-type': 'text/xml; charset=utf-8', 'Soapaction': b'""'}
MESSAGE:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://adwords.google.com/api/adwords/cm/v201710" xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201710" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header><tns:RequestHeader><tns:clientCustomerId>406-736-8627</tns:clientCustomerId><tns:developerToken>REDACTED</tns:developerToken><tns:userAgent>unknown (AwApi-Python, googleads/9.0.0, Python/3.6.2)</tns:userAgent><tns:validateOnly>false</tns:validateOnly><tns:partialFailure>false</tns:partialFailure></tns:RequestHeader></SOAP-ENV:Header><ns1:Body><ns0:get><ns0:serviceSelector><ns0:fields>Id</ns0:fields><ns0:fields>Name</ns0:fields><ns0:fields>Status</ns0:fields><ns0:paging><ns0:startIndex>0</ns0:startIndex><ns0:numberResults>100</ns0:numberResults></ns0:paging></ns0:serviceSelector></ns0:get></ns1:Body></SOAP-ENV:Envelope>
DEBUG:suds.transport.http:received:
CODE: 200
HEADERS: Content-Type: text/xml; charset=UTF-8
Date: Wed, 14 Mar 2018 14:08:54 GMT
Expires: Wed, 14 Mar 2018 14:08:54 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v="41,39,35"
Accept-Ranges: none
Vary: Accept-Encoding
Connection: close


MESSAGE:
b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201710"><requestId>0005675fea4fa7200a37d1cded082532</requestId><serviceName>CampaignService</serviceName><methodName>get</methodName><operations>1</operations><responseTime>199</responseTime></ResponseHeader></soap:Header><soap:Body><getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201710"><rval><totalNumEntries>4</totalNumEntries><Page.Type>CampaignPage</Page.Type><entries><id>1065092148</id><name>Campaign #1</name><status>ENABLED</status><budget></budget></entries><entries><id>1065460303</id><name>Interplanetary Cruise #e8f5dfad-abc7-4fa8-ad2b-c5ae66687031</name><status>PAUSED</status><budget></budget></entries><entries><id>1065460306</id><name>Interplanetary Cruise banner #c9107484-8ef8-4b02-b137-812295a632d1</name><status>PAUSED</status><budget></budget></entries><entries><id>1138428197</id><name>Marketing Digital</name><status>ENABLED</status><budget></budget></entries></rval></getResponse></soap:Body></soap:Envelope>'
INFO:googleads.common:Response summary - {'requestId': 0005675fea4fa7200a37d1cded082532, 'responseTime': 199, 'serviceName': CampaignService, 'methodName': get, 'operations': 1, 'isFault': False}


When I read the first part, I recognize that there is a problem with the UTF-8. But in my IDE I have it configured that way.
What can be the reason for these messages? Thank you.

Luis Xander Talag (AdWords API Team)

unread,
Mar 15, 2018, 1:34:02 AM3/15/18
to AdWords API Forum
Hi Santiago,

Your SOAP request and response appears to be fine and the warning issue regarding UTF-8 seems to be more related to the configuration of your client library. I would suggest to post your issue here as the client library owners are better equipped to assist you in this matter.

Thanks and regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages