Python ';非类型';对象没有属性';promotePrefixes';
因此,最初我通过以下方式连接到服务器:Python ';非类型';对象没有属性';promotePrefixes';,python,suds,nonetype,Python,Suds,Nonetype,因此,最初我通过以下方式连接到服务器: soapclient = Client(url, transport=WindowsHttpAuthenticated(username=user, password=passwd)) 这很好,因为当我打印它时,它正确地显示了它的所有属性 然后我跑: request = self.soapclient.factory.create('ns3:CRRequest') request['ChangeRequestId'] = '601904' respons
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'
回溯(最近一次呼叫最后一次):
文件“C:\Users\nlujan\Desktop\prism\u source.py”,第63行,在
CR=prism.getChangeRequestById('601904')
文件“C:\Users\nlujan\Desktop\prism\u source.py”,第36行,位于getChangeRequestById中
response=self.soapclient.service.GetChangeRequestById([request])
调用中第542行的文件“build\bdist.win32\egg\suds\client.py”__
返回client.invoke(args、kwargs)
调用中第602行的文件“build\bdist.win32\egg\suds\client.py”
文件“build\bdist.win32\egg\suds\client.py”,第643行,在send中
结果=self.successed(绑定、回复、消息)
文件“build\bdist.win32\egg\suds\client.py”,第678行,输入成功
reply,result=binding.get\u reply(self.method,reply)
文件“build\bdist.win32\egg\suds\bindings\binding.py”,第149行,在get\u reply中
soapenv.promotePrefixes()
AttributeError:“非类型”对象没有属性“promotePrefixes”
我让其他人运行我的脚本,它在他们的计算机上运行良好,但我的脚本中不断出现错误。我已经安装了几个不同版本的python,看看这是否是问题所在,但运气不好。有人看到问题出在哪里了吗 尝试添加端点地址
client = Client('url', location = "https://someurl/services")
你用的是什么版本的肥皂水?