Thanks Eric,

Attached is a sample from the console output.



On Wednesday, April 4, 2012 1:47:39 PM UTC-7, Eric Koleda wrote:
>
> Hi Sid,
>
> What kind of console messages are you seeing?  The Python Client Library 
> shouldn't output anything to the console on it's own.
>
> Best,
> - Eric Koleda, AdWords API Team
>
> On Monday, April 2, 2012 3:18:57 PM UTC-4, Sid wrote:
>>
>> Hi
>>
>> I'm updating max_cpc via the python API to my Adwords account. I would 
>> like to restrict the amount of console output so that I can email the 
>> output to myself in the cron and keep track of success/failures. However 
>> the size of SOAP messages is so large that my mail server is unable to mail 
>> the output to me. Are there specific flags I can use to suppress the 
>> console messages? Ideally I'd only like to be able to see what I explicitly 
>> print out in my code as the email content. Snippet from my code:
>>
>> for row in rows:
>>   ad_group_id = str(row[0])
>>   criterion_id = str(row[1])
>>   max_cpc = row[2]
>>   operations = [{
>>       'operator': 'SET',
>>       'operand': {
>>           'xsi_type': 'BiddableAdGroupCriterion',
>>           'adGroupId': ad_group_id,
>>           'criterion': {
>>               'id': criterion_id,
>>           },
>>           'bids': {
>>               'xsi_type': 'ManualCPCAdGroupCriterionBids',
>>               'maxCpc': {
>>                   'amount': {
>>                       'microAmount': max_cpc
>>                   }
>>               }
>>           }
>>       }
>>   }]
>>   try:
>>    ad_group_criteria = ad_group_criterion_service.Mutate(operations)[0]
>>   except Exception as e:
>>    print "Failed to update bid (%s,%s,%s) for account %s Exception %s" 
>> %(ad_group_id,criterion_id,max_cpc,input_account,e)
>>  print str(cursor.rowcount) + " Bids updated for account " + input_account
>>
>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
************************************************************************
*** Outgoing SOAP ******************************************************
<?xml version='1.0' encoding='UTF-8'?>
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
ns0:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
 <ns0:Header>
  <ns1:RequestHeader>
   <ns1:developerToken>U1bJaC-t09kZVC9O2QKEow</ns1:developerToken>
   <ns1:userAgent>AwApi-Python-15.0.3|AwApi-Python-15.1.5 (Python 
2.7)|Adwords_SH</ns1:userAgent>
   <ns1:authToken>xxxxxx</ns1:authToken>
   <ns1:clientCustomerId>5716626406</ns1:clientCustomerId>
  </ns1:RequestHeader>
 </ns0:Header>
 <ns0:Body>
  <ns1:mutate>
   <ns1:operations xsi:type="cm:AdGroupCriterionOperation">
    <ns1:operator>SET</ns1:operator>
    <ns1:operand xsi:type="cm:BiddableAdGroupCriterion">
     <ns1:adGroupId>4573061155</ns1:adGroupId>
     <ns1:criterion xsi:type="cm:Criterion">
      <ns1:id>43107689995</ns1:id>
     </ns1:criterion>
     <ns1:bids xsi:type="cm:ManualCPCAdGroupCriterionBids">
      <ns1:maxCpc xsi:type="cm:Bid">
       <ns1:amount xsi:type="cm:Money">
        <ns1:microAmount>220000</ns1:microAmount>
       </ns1:amount>
      </ns1:maxCpc>
     </ns1:bids>
    </ns1:operand>
   </ns1:operations>
  </ns1:mutate>
 </ns0:Body>
</ns0:Envelope>
************************************************************************
*** Incoming HTTP headers **********************************************
HTTP/1.? 200 OK
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Wed, 04 Apr 2012 20:52:31 GMT
Expires: Wed, 04 Apr 2012 20:52:31 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 748
Server: GSE
************************************************************************
*** Incoming SOAP ******************************************************
<?xml version='1.0' encoding='UTF-8'?>
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <ns0:Header>
  <ns1:ResponseHeader>
   <ns1:requestId>0004bce09a1e0f000a422e0c0000703c</ns1:requestId>
   <ns1:serviceName>AdGroupCriterionService</ns1:serviceName>
   <ns1:methodName>mutate</ns1:methodName>
   <ns1:operations>1</ns1:operations>
   <ns1:responseTime>143</ns1:responseTime>
   <ns1:units>3</ns1:units>
  </ns1:ResponseHeader>
 </ns0:Header>
 <ns0:Body>
  <ns1:mutateResponse>
   <ns1:rval>
    
<ns1:ListReturnValue.Type>AdGroupCriterionReturnValue</ns1:ListReturnValue.Type>
    <ns1:value xsi:type="BiddableAdGroupCriterion">
     <ns1:adGroupId>4573061155</ns1:adGroupId>
     <ns1:criterion xsi:type="Keyword">
      <ns1:id>43107689995</ns1:id>
      <ns1:type>KEYWORD</ns1:type>
      <ns1:Criterion.Type>Keyword</ns1:Criterion.Type>
      <ns1:text>+Jobs +San +Marcos</ns1:text>
      <ns1:matchType>BROAD</ns1:matchType>
     </ns1:criterion>
     
<ns1:AdGroupCriterion.Type>BiddableAdGroupCriterion</ns1:AdGroupCriterion.Type>
     <ns1:userStatus>ACTIVE</ns1:userStatus>
     <ns1:systemServingStatus>ELIGIBLE</ns1:systemServingStatus>
     <ns1:approvalStatus>APPROVED</ns1:approvalStatus>
     <ns1:bids xsi:type="ManualCPCAdGroupCriterionBids">
      
<ns1:AdGroupCriterionBids.Type>ManualCPCAdGroupCriterionBids</ns1:AdGroupCriterionBids.Type>
      <ns1:maxCpc>
       <ns1:amount>
        <ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type>
        <ns1:microAmount>220000</ns1:microAmount>
       </ns1:amount>
      </ns1:maxCpc>
      <ns1:bidSource>CRITERION</ns1:bidSource>
      <ns1:enhancedCpcEnabled>false</ns1:enhancedCpcEnabled>
     </ns1:bids>
     <ns1:firstPageCpc>
      <ns1:amount>
       <ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type>
       <ns1:microAmount>1000000</ns1:microAmount>
      </ns1:amount>
     </ns1:firstPageCpc>
     <ns1:qualityInfo>
      
<ns1:isKeywordAdRelevanceAcceptable>false</ns1:isKeywordAdRelevanceAcceptable>
      
<ns1:isLandingPageQualityAcceptable>true</ns1:isLandingPageQualityAcceptable>
      
<ns1:isLandingPageLatencyAcceptable>true</ns1:isLandingPageLatencyAcceptable>
      <ns1:qualityScore>3</ns1:qualityScore>
     </ns1:qualityInfo>
    </ns1:value>
   </ns1:rval>
  </ns1:mutateResponse>
 </ns0:Body>
</ns0:Envelope>
************************************************************************
EndTime: 2012-04-04 13:52:31
[2012-04-04 13:52:31,370::DEBUG::AwApi-Python-15.1.5 (Python 2.7)] 
host=adwords.google.com service=AdGroupCriterionService method=mutate 
operator={'SET': 1} responseTime=143 operations=1 units=3 
requestId=0004bce09a1e0f000a422e0c0000703c isFault=False
[2012-04-04 13:52:31,696::DEBUG::AwApi-Python-15.1.5 (Python 2.7)] StartTime: 
2012-04-04 13:52:31
*** Outgoing HTTP headers **********************************************
POST /api/adwords/cm/v201109/AdGroupCriterionService HTTP/1.0
Host:adwords.google.com
User-agent:SOAPpy 0.12.0 (pywebsvcs.sf.net),gzip
XML-parser: xml.etree.cElementTree v1.0.6
Content-type:text/xml; charset="UTF-8"
Content-length:969
Accept-Encoding:gzip
Content-Encoding:gzip
SOAPAction:"mutate"
************************************************************************
*** Outgoing SOAP ******************************************************
<?xml version='1.0' encoding='UTF-8'?>
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
ns0:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
 <ns0:Header>
  <ns1:RequestHeader>
   <ns1:developerToken>U1bJaC-t09kZVC9O2QKEow</ns1:developerToken>
   <ns1:userAgent>AwApi-Python-15.0.3|AwApi-Python-15.1.5 (Python 
2.7)|Adwords_SH</ns1:userAgent>
   <ns1:authToken>xxxxxx</ns1:authToken>
   <ns1:clientCustomerId>5716626406</ns1:clientCustomerId>
  </ns1:RequestHeader>
 </ns0:Header>
 <ns0:Body>
  <ns1:mutate>
   <ns1:operations xsi:type="cm:AdGroupCriterionOperation">
    <ns1:operator>SET</ns1:operator>
    <ns1:operand xsi:type="cm:BiddableAdGroupCriterion">
     <ns1:adGroupId>4573066915</ns1:adGroupId>
     <ns1:criterion xsi:type="cm:Criterion">
      <ns1:id>43102392355</ns1:id>
     </ns1:criterion>
     <ns1:bids xsi:type="cm:ManualCPCAdGroupCriterionBids">
      <ns1:maxCpc xsi:type="cm:Bid">
       <ns1:amount xsi:type="cm:Money">
        <ns1:microAmount>130000</ns1:microAmount>
       </ns1:amount>
      </ns1:maxCpc>
     </ns1:bids>
    </ns1:operand>
   </ns1:operations>
  </ns1:mutate>
 </ns0:Body>
</ns0:Envelope>
************************************************************************
*** Incoming HTTP headers **********************************************
HTTP/1.? 200 OK
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Wed, 04 Apr 2012 20:52:31 GMT
Expires: Wed, 04 Apr 2012 20:52:31 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 751
Server: GSE
************************************************************************
*** Incoming SOAP ******************************************************
<?xml version='1.0' encoding='UTF-8'?>
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <ns0:Header>
  <ns1:ResponseHeader>
   <ns1:requestId>0004bce09a22d1c00a422e0c0000703c</ns1:requestId>
   <ns1:serviceName>AdGroupCriterionService</ns1:serviceName>
   <ns1:methodName>mutate</ns1:methodName>
   <ns1:operations>1</ns1:operations>
   <ns1:responseTime>160</ns1:responseTime>
   <ns1:units>3</ns1:units>
  </ns1:ResponseHeader>
 </ns0:Header>
 <ns0:Body>
  <ns1:mutateResponse>
   <ns1:rval>
    
<ns1:ListReturnValue.Type>AdGroupCriterionReturnValue</ns1:ListReturnValue.Type>
    <ns1:value xsi:type="BiddableAdGroupCriterion">
     <ns1:adGroupId>4573066915</ns1:adGroupId>
     <ns1:criterion xsi:type="Keyword">
      <ns1:id>43102392355</ns1:id>
      <ns1:type>KEYWORD</ns1:type>
      <ns1:Criterion.Type>Keyword</ns1:Criterion.Type>
      <ns1:text>+Jobs +Castro +Valley</ns1:text>
      <ns1:matchType>BROAD</ns1:matchType>
     </ns1:criterion>
     
<ns1:AdGroupCriterion.Type>BiddableAdGroupCriterion</ns1:AdGroupCriterion.Type>
     <ns1:userStatus>ACTIVE</ns1:userStatus>
     <ns1:systemServingStatus>ELIGIBLE</ns1:systemServingStatus>
     <ns1:approvalStatus>APPROVED</ns1:approvalStatus>
     <ns1:bids xsi:type="ManualCPCAdGroupCriterionBids">
      
<ns1:AdGroupCriterionBids.Type>ManualCPCAdGroupCriterionBids</ns1:AdGroupCriterionBids.Type>
      <ns1:maxCpc>
       <ns1:amount>
        <ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type>
        <ns1:microAmount>130000</ns1:microAmount>
       </ns1:amount>
      </ns1:maxCpc>
      <ns1:bidSource>CRITERION</ns1:bidSource>
      <ns1:enhancedCpcEnabled>false</ns1:enhancedCpcEnabled>
     </ns1:bids>
     <ns1:firstPageCpc>
      <ns1:amount>
       <ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type>
       <ns1:microAmount>500000</ns1:microAmount>
      </ns1:amount>
     </ns1:firstPageCpc>
     <ns1:qualityInfo>
      
<ns1:isKeywordAdRelevanceAcceptable>false</ns1:isKeywordAdRelevanceAcceptable>
      
<ns1:isLandingPageQualityAcceptable>true</ns1:isLandingPageQualityAcceptable>
      
<ns1:isLandingPageLatencyAcceptable>true</ns1:isLandingPageLatencyAcceptable>
      <ns1:qualityScore>4</ns1:qualityScore>
     </ns1:qualityInfo>
    </ns1:value>
   </ns1:rval>
  </ns1:mutateResponse>
 </ns0:Body>
</ns0:Envelope>
************************************************************************
EndTime: 2012-04-04 13:52:31
[2012-04-04 13:52:31,697::DEBUG::AwApi-Python-15.1.5 (Python 2.7)] 
host=adwords.google.com service=AdGroupCriterionService method=mutate 
operator={'SET': 1} responseTime=160 operations=1 units=3 
requestId=0004bce09a22d1c00a422e0c0000703c isFault=False
[2012-04-04 13:52:32,016::DEBUG::AwApi-Python-15.1.5 (Python 2.7)] StartTime: 
2012-04-04 13:52:31
*** Outgoing HTTP headers **********************************************
POST /api/adwords/cm/v201109/AdGroupCriterionService HTTP/1.0
Host:adwords.google.com
User-agent:SOAPpy 0.12.0 (pywebsvcs.sf.net),gzip
XML-parser: xml.etree.cElementTree v1.0.6
Content-type:text/xml; charset="UTF-8"
Content-length:969
Accept-Encoding:gzip
Content-Encoding:gzip
SOAPAction:"mutate"
************************************************************************
*** Outgoing SOAP ******************************************************
<?xml version='1.0' encoding='UTF-8'?>
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
ns0:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
 <ns0:Header>
  <ns1:RequestHeader>
   <ns1:developerToken>U1bJaC-t09kZVC9O2QKEow</ns1:developerToken>
   <ns1:userAgent>AwApi-Python-15.0.3|AwApi-Python-15.1.5 (Python 
2.7)|Adwords_SH</ns1:userAgent>
   <ns1:authToken>xxxxxx</ns1:authToken>
   <ns1:clientCustomerId>5716626406</ns1:clientCustomerId>
  </ns1:RequestHeader>
 </ns0:Header>
 <ns0:Body>
  <ns1:mutate>
   <ns1:operations xsi:type="cm:AdGroupCriterionOperation">
    <ns1:operator>SET</ns1:operator>
    <ns1:operand xsi:type="cm:BiddableAdGroupCriterion">
     <ns1:adGroupId>4573070035</ns1:adGroupId>
     <ns1:criterion xsi:type="cm:Criterion">
      <ns1:id>43106812195</ns1:id>
     </ns1:criterion>
     <ns1:bids xsi:type="cm:ManualCPCAdGroupCriterionBids">
      <ns1:maxCpc xsi:type="cm:Bid">
       <ns1:amount xsi:type="cm:Money">
        <ns1:microAmount>150000</ns1:microAmount>
       </ns1:amount>
      </ns1:maxCpc>
     </ns1:bids>
    </ns1:operand>
   </ns1:operations>
  </ns1:mutate>
 </ns0:Body>
</ns0:Envelope>
************************************************************************
*** Incoming HTTP headers **********************************************
HTTP/1.? 200 OK
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Wed, 04 Apr 2012 20:52:31 GMT
Expires: Wed, 04 Apr 2012 20:52:31 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 742
Server: GSE
************************************************************************
*** Incoming SOAP ******************************************************
<?xml version='1.0' encoding='UTF-8'?>
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201109"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <ns0:Header>
  <ns1:ResponseHeader>
   <ns1:requestId>0004bce09a27cb300a4229500000683d</ns1:requestId>
   <ns1:serviceName>AdGroupCriterionService</ns1:serviceName>
   <ns1:methodName>mutate</ns1:methodName>
   <ns1:operations>1</ns1:operations>
   <ns1:responseTime>153</ns1:responseTime>
   <ns1:units>3</ns1:units>
  </ns1:ResponseHeader>
 </ns0:Header>
 <ns0:Body>
  <ns1:mutateResponse>
   <ns1:rval>
    
<ns1:ListReturnValue.Type>AdGroupCriterionReturnValue</ns1:ListReturnValue.Type>
    <ns1:value xsi:type="BiddableAdGroupCriterion">
     <ns1:adGroupId>4573070035</ns1:adGroupId>
     <ns1:criterion xsi:type="Keyword">
      <ns1:id>43106812195</ns1:id>
      <ns1:type>KEYWORD</ns1:type>
      <ns1:Criterion.Type>Keyword</ns1:Criterion.Type>
      <ns1:text>+Jobs +Bend</ns1:text>
      <ns1:matchType>BROAD</ns1:matchType>
     </ns1:criterion>
     
<ns1:AdGroupCriterion.Type>BiddableAdGroupCriterion</ns1:AdGroupCriterion.Type>
     <ns1:userStatus>ACTIVE</ns1:userStatus>
     <ns1:systemServingStatus>ELIGIBLE</ns1:systemServingStatus>
     <ns1:approvalStatus>APPROVED</ns1:approvalStatus>
     <ns1:bids xsi:type="ManualCPCAdGroupCriterionBids">
      
<ns1:AdGroupCriterionBids.Type>ManualCPCAdGroupCriterionBids</ns1:AdGroupCriterionBids.Type>
      <ns1:maxCpc>
       <ns1:amount>
        <ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type>
        <ns1:microAmount>150000</ns1:microAmount>
       </ns1:amount>
      </ns1:maxCpc>
      <ns1:bidSource>CRITERION</ns1:bidSource>
      <ns1:enhancedCpcEnabled>false</ns1:enhancedCpcEnabled>
     </ns1:bids>
     <ns1:firstPageCpc>
      <ns1:amount>
       <ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type>
       <ns1:microAmount>1000000</ns1:microAmount>
      </ns1:amount>
     </ns1:firstPageCpc>
     <ns1:qualityInfo>
      
<ns1:isKeywordAdRelevanceAcceptable>false</ns1:isKeywordAdRelevanceAcceptable>
      
<ns1:isLandingPageQualityAcceptable>true</ns1:isLandingPageQualityAcceptable>
      
<ns1:isLandingPageLatencyAcceptable>true</ns1:isLandingPageLatencyAcceptable>
      <ns1:qualityScore>3</ns1:qualityScore>
     </ns1:qualityInfo>
    </ns1:value>
   </ns1:rval>
  </ns1:mutateResponse>
 </ns0:Body>
</ns0:Envelope>

Reply via email to