I tried to use zeep library to make SOAP reuests and had trouble with ImportError:

513 Views Asked by At
>>> from zeep import Client
>>> from zeep.wsse.signature import Signature
>>> client = Client(
...     'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
...     wsse=Signature(
...         private_key_filename, public_key_filename,
...         optional_password))

I ran the code based on this official sample code above. However, I got this error below.

ImportError: The xmlsec module is required for wsse.Signature()
You can install xmlsec with: pip install xmlsec
or install zeep via: pip install zeep[xmlsec]

But, I've already installed that.

Edit:

When I put just import xmlsec I got this error below:

ImportError: dlopen(/Users/myaccount/opt/miniconda3/lib/python3.8/site-packages/xmlsec.cpython-38-darwin.so, 2):
  Symbol not found: _xmlSecDSigNs
  Referenced from: /Users/myaccount/opt/miniconda3/lib/python3.8/site-packages/xmlsec.cpython-38-darwin.so
  Expected in: flat namespace in /Users/myaccount/opt/miniconda3/lib/python3.8/site-packages/xmlsec.cpython-38-darwin.so
0

There are 0 best solutions below