A simple script to get the media profiles like this:
#!/usr/bin/env python3
from onvif import ONVIFCamera
mycam = ONVIFCamera('10.23.67.76', 8899, 'admin', '', './wsdl/')
media = mycam.create_media_service()
resp = media.GetProfiles();
print("Video is " + str(resp))
Fails with what appears to be a XML parsing trace:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.11-py3.6.egg/onvif/client.py", line 24, in wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.11-py3.6.egg/onvif/client.py", line 183, in wrapped
return call(params, callback)
File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.11-py3.6.egg/onvif/client.py", line 170, in call
ret = func(**params)
File "/usr/local/lib/python3.6/dist-packages/zeep/proxy.py", line 42, in __call__
self._op_name, args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/bindings/soap.py", line 126, in send
return self.process_reply(client, operation_obj, response)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/bindings/soap.py", line 190, in process_reply
result = operation.process_reply(doc)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/bindings/soap.py", line 371, in process_reply
return self.output.deserialize(envelope)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/messages/soap.py", line 91, in deserialize
body_result = self._deserialize_body(body)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/messages/soap.py", line 413, in _deserialize_body
result = self.body.parse(xmlelement, self.wsdl.types, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 114, in parse
schema_type=self.type)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 169, in parse_xmlelement
elements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 600, in parse_xmlelements
xmlelements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 160, in parse_xmlelements
xmlelement, schema, allow_none=True, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 114, in parse
schema_type=self.type)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 169, in parse_xmlelement
elements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 600, in parse_xmlelements
xmlelements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 160, in parse_xmlelements
xmlelement, schema, allow_none=True, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 114, in parse
schema_type=self.type)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 169, in parse_xmlelement
elements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 600, in parse_xmlelements
xmlelements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 160, in parse_xmlelements
xmlelement, schema, allow_none=True, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 114, in parse
schema_type=self.type)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 169, in parse_xmlelement
elements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 600, in parse_xmlelements
xmlelements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 160, in parse_xmlelements
xmlelement, schema, allow_none=True, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 114, in parse
schema_type=self.type)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 169, in parse_xmlelement
elements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 600, in parse_xmlelements
xmlelements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 160, in parse_xmlelements
xmlelement, schema, allow_none=True, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 114, in parse
schema_type=self.type)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 169, in parse_xmlelement
elements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 600, in parse_xmlelements
xmlelements, schema, name, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 160, in parse_xmlelements
xmlelement, schema, allow_none=True, context=context)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 114, in parse
schema_type=self.type)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 189, in parse_xmlelement
init_kwargs[name] = attribute.parse(value)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/attribute.py", line 22, in parse
return self.type.pythonvalue(value)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/simple.py", line 68, in pythonvalue
'%s.pytonvalue() not implemented' % self.__class__.__name__)
NotImplementedError: AnySimpleType.pytonvalue() not implemented
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./set_onvif", line 7, in <module>
resp = media.GetProfiles();
File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.11-py3.6.egg/onvif/client.py", line 28, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: AnySimpleType.pytonvalue() not implemented
A simple script to get the media profiles like this:
Fails with what appears to be a XML parsing trace: