I'm attempting to pull the InvoiceLine table via a python script that's been working for months but all of a sudden is having issues.
The zeep client (or underlying lxml pkg) is having issues parsing the soap response:
Traceback (most recent call last):
File "/home/user/envs/sales/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 170, in process_reply
doc = parse_xml(content, self.transport, settings=client.settings)
File "/home/user/envs/sales/lib/python3.6/site-packages/zeep/loader.py", line 54, in parse_xml
content=content
zeep.exceptions.XMLSyntaxError: Invalid XML content received (xmlSAX2Characters: huge text node, line 321734, column 43)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/envs/sales/lib/python3.6/site-packages/zeep/proxy.py", line 42, in __call__
self._op_name, args, kwargs)
File "/home/user/envs/sales/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 132, in send
return self.process_reply(client, operation_obj, response)
File "/home/user/envs/sales/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 176, in process_reply
content=response.content)
zeep.exceptions.TransportError: Server returned response (200) with invalid XML: Invalid XML content received (xmlSAX2Characters: huge text node, line 321734, column 43).
I'm requesting the following fields from the InvoiceLine table:
'Item', 'Amount', 'Class', 'Desc', 'InvoiceAmount', 'LotNumber', 'Other1', 'Quantity', 'Rate', 'Other2', 'TotalAmount', 'InvoiceRecordID', 'RecordID', 'TxnLineID'
Strange this is if I exclude any of the above fields then the reponse comes back fine. Is there just too much data being returned?
EDIT:
I enabled the xml_huge_tree setting in the zeep client and am no longer having this issue.
>xml_huge_tree – disable lxml/libxml2 security restrictions and support very deep trees and very long text content
I'm still not sure what is happening here, if anyone can shed some light on it would be much appreciated.