Error during set ads

28 views
Skip to first unread message

Dmitry Shvetsov

unread,
May 14, 2019, 12:00:41 PM5/14/19
to AdWords API and Google Ads API Forum
Hello!
I setting ads with this code http://prntscr.com/nohqxz and got error below on 987 ad. What can be a reason of error and how to prevent it?

Error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/zeep/loader.py", line 50, in parse_xml
    forbid_entities=settings.forbid_entities)
  File "/usr/local/lib/python3.5/dist-packages/defusedxml/lxml.py", line 143, in fromstring
    rootelement = _etree.fromstring(text, parser, base_url=base_url)
  File "src/lxml/etree.pyx", line 3222, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1877, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1765, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
  File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError
  File "<string>", line 2
lxml.etree.XMLSyntaxError: AttValue: " or ' expected, line 2, column 12

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/zeep/wsdl/bindings/soap.py", line 170, in process_reply
    doc = parse_xml(content, self.transport, settings=client.settings)
  File "/usr/local/lib/python3.5/dist-packages/zeep/loader.py", line 54, in parse_xml
    content=content
zeep.exceptions.XMLSyntaxError: Invalid XML content received (AttValue: " or ' expected, line 2, column 12)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "get_mutate_actionAds_my.py", line 568, in <module>
    result = ad_service_mutate.mutate(operations)
  File "/usr/local/lib/python3.5/dist-packages/googleads/common.py", line 1382, in MakeSoapRequest
    *packed_args, _soapheaders=soap_headers)['body']['rval']
  File "/usr/local/lib/python3.5/dist-packages/zeep/proxy.py", line 42, in __call__
    self._op_name, args, kwargs)
  File "/usr/local/lib/python3.5/dist-packages/zeep/wsdl/bindings/soap.py", line 132, in send
    return self.process_reply(client, operation_obj, response)
  File "/usr/local/lib/python3.5/dist-packages/zeep/wsdl/bindings/soap.py", line 176, in process_reply
    content=response.content)

googleadsapi...@google.com

unread,
May 14, 2019, 5:27:23 PM5/14/19
to AdWords API and Google Ads API Forum
Hello Dmitry, 

Could you please share the complete Python script that you're running to investigate further? You may share the details privately via Reply privately to author option. 

Thanks,
Bharani, Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

googleadsapi...@google.com

unread,
May 15, 2019, 11:58:48 AM5/15/19
to AdWords API and Google Ads API Forum
Hello Dmitry, 

I was able to pull the individual queries from your code snippets and compile them without any issues. It looks like the issue is specific to the Python client library. Could you please post your concern on the Github issue tracker and the library owners will be able to take a look?
Reply all
Reply to author
Forward
0 new messages