我试着研究这个问题,但似乎它的原因可以是多种多样的,并希望一些投入。下一行
resultRisport70 = clientRisport70.service.selectCmDevice('','CmSelectionCriteria'({'SelectBy':'Name','Status':'Any','DeviceClass':'Phone','SelectItems':{'item':{'Item':'SEPblah'}}}))
引起错误
TypeError: 'str' object is not callable
我试过重新设计线路,但我似乎搞不清楚问题所在。我在python2中也有一条类似的构造线,看起来很管用,但是python3中的这条确实运行。感谢您的帮助。你知道吗
我有相同的类型代码,用php编写
$devices1 = $soapClient->selectCmDevice(array(
'StateInfo' => '',
'CmSelectionCriteria'=>
(array(
'DeviceClass'=>'Phone',
'SelectBy'=>'Name',
'Status'=>'Registered',
'Protocol'=>'Any',
'DownloadStatus'=>'Any',
'SelectItems'=>array(
'item'=>array(
'Item'=>'*' . $searchString . '*'
))))));
下面是同一个代码的一个版本,它是一个简化的WSDL,但似乎工作得很好
resultRisport70 = clientRisport70.service.SelectCmDevice('',{'SelectBy':'Name', 'Status':'Registered', 'Class':'Phone','SelectItems':{'SelectItem':{'Item':phoneDetailName}}})
我认为您试图在这里调用字符串作为函数,这是不可能的。具体来说
'CmSelectionCriteria'()
无效。你知道吗"abc"()
会导致相同的错误。不能对字符串执行调用。你知道吗如果CmSelectionCriteria是您在其他地方定义的函数,请删除引号。你知道吗
相关问题 更多 >
编程相关推荐