I am having trouble making a request. The error I get is TypeError: cannot pickle 'lxml.etree.QName' object. I saw that there was a similar issue some time ago: https://github.com/mvantellingen/python-zeep/issues/842, but the bug-reporter moved on and the issue was closed before it was resolved.
Running:
zeep==4.1.0
lxml==4.6.3
python version is 3.8.3 (also tried on 3.9.7)
Here is the script that fails. Note that the UN/PW and request are not relevant at this stage because the error occurs before the request is made.
from lxml import etree
from zeep import Client
wsdl = 'https://services.mycccportal.com/CCCOne/RF/ONEService/PartnerGatewayService.asmx?WSDL'
client = Client(wsdl)
_soapheaders = client.get_element('ns1:Security')
_soapheaders({'Username': 'A_Username', 'Password': 'A_Password'})
request = 'a string'
# result = client.service.Execute(request=request, _soapheaders=_soapheaders)
node = client.create_message(client.service, 'Execute', request=request, _soapheaders=_soapheaders)
print(etree.tostring(node, pretty_print=True))
I am having trouble making a request. The error I get is
TypeError: cannot pickle 'lxml.etree.QName' object
. I saw that there was a similar issue some time ago: https://github.com/mvantellingen/python-zeep/issues/842, but the bug-reporter moved on and the issue was closed before it was resolved.Running: zeep==4.1.0 lxml==4.6.3
python version is 3.8.3 (also tried on 3.9.7)
Here is the script that fails. Note that the UN/PW and request are not relevant at this stage because the error occurs before the request is made.