Python client Internal_Api_Error

69 views
Skip to first unread message

hsw.s...@gmail.com

unread,
Mar 24, 2016, 8:30:36 AM3/24/16
to AdWords API Forum
Using the python client on 2.7.9, I receive the following error on every request.
suds.WebFault: Server raised fault: '[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR

I'd like to determine if I am doing something wrong or if there is a problem with the api or client?

This is the SOAP request from the client:
   <SOAP-ENV:Header>
      <tns:RequestHeader>
         <tns:clientCustomerId xmlns:tns="https://adwords.google.com/api/adwords/cm/v201509">REDACTED</tns:clientCustomerId>
         <tns:developerToken xmlns:tns="https://adwords.google.com/api/adwords/cm/v201509">REDACTED</tns:developerToken>
         <tns:userAgent xmlns:tns="https://adwords.google.com/api/adwords/cm/v201509">REDACTED(AwApi-Python, googleads/3.13.0, Python/2.7.9)</tns:userAgent>
         <tns:validateOnly xmlns:tns="https://adwords.google.com/api/adwords/cm/v201509">false</tns:validateOnly>
         <tns:partialFailure xmlns:tns="https://adwords.google.com/api/adwords/cm/v201509">false</tns:partialFailure>
      </tns:RequestHeader>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns2:get>
         <ns2:selector>
            <ns2:campaignEstimateRequests>
               <ns2:adGroupEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>famine articles</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>butter flavoring</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>hyperspace michio kaku</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>disaster kit</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>solid state laser</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>nanoscience and nanotechnology</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>baby pajamas</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>how much is embalming</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>erosion video</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>silicon crystals</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>air sensor</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>moan chomsky</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>xray tech</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>navy ships for sale</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>grey hair color</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>defender 110</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>what causes a nuclear explosion</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>cheap hotels in san antonio</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>write will</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:keywordEstimateRequests>
                     <ns2:keyword>
                        <ns0:text>gun safety articles</ns0:text>
                        <ns0:matchType>PHRASE</ns0:matchType>
                     </ns2:keyword>
                  </ns2:keywordEstimateRequests>
                  <ns2:maxCpc>
                     <ns0:microAmount>100000</ns0:microAmount>
                  </ns2:maxCpc>
               </ns2:adGroupEstimateRequests>
               <ns2:criteria>
                  <ns0:id>2840</ns0:id>
               </ns2:criteria>
               <ns2:criteria>
                  <ns0:id>1000</ns0:id>
               </ns2:criteria>
            </ns2:campaignEstimateRequests>
         </ns2:selector>
      </ns2:get>
   </ns1:Body>
</SOAP-ENV:Envelope>

FULL stack trace:
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.4\helpers\pydev\pydevd.py", line 2358, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.4\helpers\pydev\pydevd.py", line 1778, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:/GitHub/widgetTestBed/GoogleKeywordEstimates.py", line 151, in <module>
    main(adwords_client)
  File "C:/GitHub/widgetTestBed/GoogleKeywordEstimates.py", line 103, in main
    estimates = traffic_estimator_service.get(selector)
  File "C:\Python27\lib\site-packages\googleads\common.py", line 323, in MakeSoapRequest
    for arg in args])
  File "C:\Python27\lib\site-packages\suds\client.py", line 521, in __call__
    return client.invoke(args, kwargs)
  File "C:\Python27\lib\site-packages\suds\client.py", line 581, in invoke
    result = self.send(soapenv)
  File "C:\Python27\lib\site-packages\suds\client.py", line 619, in send
    description=tostr(e), original_soapenv=original_soapenv)
  File "C:\Python27\lib\site-packages\suds\client.py", line 670, in process_reply
    raise WebFault(fault, replyroot)
suds.WebFault: Server raised fault: '[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]'

Anash P. Oommen (AdWords API Team)

unread,
Apr 5, 2016, 12:20:10 AM4/5/16
to AdWords API Forum
Hi,

Apologies for the delay, could you kindly check and see if this error is still replicable? If yes, could you kindly reply privately using the "Reply to Author" option and send me a log? The details for capturing the logs are available here. Just to confirm, this error is getting thrown from the server, and isn't related to the Python client library.

Cheers,
Anash P. Oommen,
AdWords API Advisor.
Reply all
Reply to author
Forward
0 new messages