0

我正在使用 suds 0.4 并遇到以下错误,我在网上看到上述问题自 0.3.8 以来已修复..所以我想知道这里有什么问题?

  File "script.py", line 532, in <module>
    prism = Prism('http://prism:8000/SearchService.svc?wsdl')
  File "script.py", line 31, in __init__
    self.CR_soapclient = Client(self.CR_url, transport=WindowsHttpAuthenticated(username=user, password=passwd))
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.py", line 112, in __init__
    self.wsdl = reader.open(url)
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/reader.py", line 152, in open
    d = self.fn(url, self.options)
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/wsdl.py", line 136, in __init__
    d = reader.open(url)
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/reader.py", line 79, in open
    d = self.download(url)
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/reader.py", line 95, in download
    fp = self.options.transport.open(Request(url))
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/transport/https.py", line 60, in open
    return  HttpTransport.open(self, request)
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/transport/http.py", line 62, in open
    return self.u2open(u2request)
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/transport/http.py", line 113, in u2open
    url = self.u2opener()
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/transport/http.py", line 127, in u2opener
    return u2.build_opener(*self.u2handlers())
  File "/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/transport/https.py", line 95, in u2handlers
    raise Exception("Cannot import python-ntlm module")
Exception: Cannot import python-ntlm module

泡沫版

>>> import suds
>>> print suds.__version__
0.4
4

1 回答 1

0

正如@PauloAlmeida 在评论中所建议的那样,python-ntlm不见了。要使用 pip 安装,只需在 OS shell 中键入:

pip install python-ntlm

在 Linux 上,您可能需要sudo在命令之前。

您也可以从https://pypi.python.org/pypi/python-ntlm下载该软件包。

于 2015-12-09T08:29:16.753 回答