所以最初我连接到服务器:
soapclient = Client(url, transport=WindowsHttpAuthenticated(username=user, password=passwd))
这很好用,因为当我打印它时,它会正确显示它的所有属性。
然后我运行:
request = self.soapclient.factory.create('ns3:CRRequest')
request['ChangeRequestId'] = '601904'
response = self.soapclient.service.GetChangeRequestById([request])
然后我在响应行上收到一个错误,内容如下:
Traceback (most recent call last):
File "C:\Users\nlujan\Desktop\prism_source.py", line 63, in <module>
CR = prism.getChangeRequestById('601904')
File "C:\Users\nlujan\Desktop\prism_source.py", line 36, in getChangeRequestById
response = self.soapclient.service.GetChangeRequestById([request])
File "build\bdist.win32\egg\suds\client.py", line 542, in __call__
return client.invoke(args, kwargs)
File "build\bdist.win32\egg\suds\client.py", line 602, in invoke
File "build\bdist.win32\egg\suds\client.py", line 643, in send
result = self.succeeded(binding, reply.message)
File "build\bdist.win32\egg\suds\client.py", line 678, in succeeded
reply, result = binding.get_reply(self.method, reply)
File "build\bdist.win32\egg\suds\bindings\binding.py", line 149, in get_reply
soapenv.promotePrefixes()
AttributeError: 'NoneType' object has no attribute 'promotePrefixes'
我让其他人运行了我的脚本,并且它在他们的计算机上运行良好,但我不断收到错误消息。我已经安装了几个不同版本的 python 来看看这是否是问题,但没有运气。有谁看到可能是什么问题?