mvantellingen / python-zeep

A Python SOAP client
http://docs.python-zeep.org
Other
1.87k stars 579 forks source link

AttributeError: 'NoneType' object has no attribute 'text' (bintok.text = x509_data.find(QName(ns.DS, "X509Certificate")).text) #1322

Closed kevin-olbrich closed 1 year ago

kevin-olbrich commented 1 year ago

WSSE signing does not work anymore:

Jul 29 13:00:48 slde0030.intra.example.com uwsgi[402477]:   File "/example/venv/lib/python3.9/site-packages/zeep/wsse/signature.py", line 287, in _sign_envelope_with_key_binary
Jul 29 13:00:48 slde0030.intra.example.com uwsgi[402477]:     bintok.text = x509_data.find(QName(ns.DS, "X509Certificate")).text
Jul 29 13:00:48 slde0030.intra.example.com uwsgi[402477]: AttributeError: 'NoneType' object has no attribute 'text'
kevin-olbrich commented 1 year ago

As always, after posting an issue one finds the answer. This is related to LXML:

https://stackoverflow.com/questions/71730321/soap-api-qname-find-fails-with-zeep-and-xmlsec-on-x509-data-findqnamens-ds https://bugs.launchpad.net/lxml/+bug/1960668/

After downgrade to LXML 4.6.5 the issue is gone.