2016-07-28 2 views
0

私はこのように行われたことを文書で読みました。 PythonのzeepライブラリでAnyObjectメソッドを使用するにはどうすればいいですか?

enter image description here

は、私はこれを試して簡単なコードを行なったし、私は次のことを持っています。 (ucmdbはクライアントです)

intProp_type = ucmdb.get_element('ns17:IntProp') 
intProp = xsd.AnyObject(intProp_type, intProp_type(name = "slots", value = 56)) 

このエラーが出てきます。

Traceback (most recent call last): 
    File "C:\Python\lib\site-packages\zeep-0.12.0-py3.5.egg\zeep\xsd\schema.py", line 71, in get_element 
    return schema._elements[qname] 
KeyError: <lxml.etree.QName object at 0x000001C314122F08> 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "ejemplo.py", line 35, in <module> 
    main() 
    File "ejemplo.py", line 18, in main 
    processCIs() 
    File "ejemplo.py", line 31, in processCIs 
    intProp_type = ucmdb.get_element('ns17:IntProp') 
    File "C:\Python\lib\site-packages\zeep-0.12.0-py3.5.egg\zeep\client.py", line 119, in get_element 
    return self.wsdl.types.get_element(name) 
    File "C:\Python\lib\site-packages\zeep-0.12.0-py3.5.egg\zeep\xsd\schema.py", line 81, in get_element 
    qname.localname, qname.namespace, known_elements or ' - ')) 
KeyError: "No element 'IntProp' in namespace http://schemas.hp.com/ucmdb/ui/1/types. Available elements are: - " 

答えて

0

最新バージョンで試してみるとよいでしょう。それ以外の場合はgithub.com/mvantellingen/python-zeepで問題を提出してください

+0

0.13にアップグレードされましたが、同じ問題が残っています。 –

関連する問題