FalkTannhaeuser / python-onvif-zeep

ONVIF Client Implementation in Python 2+3 (using https://github.com/mvantellingen/python-zeep instead of suds as SOAP client)
MIT License
420 stars 137 forks source link

How to get Metadata in python ONVIF? (Service has no operation `GetSupportedMetadata`) #95

Open Oh-JongJin opened 1 year ago

Oh-JongJin commented 1 year ago

image

Currently, I'm looking for metadata access functions using the in Python-onvif. I want to get the coordinates of "BoundingBox" inside the red box. How to i access data?

https://www.onvif.org/ver20/analytics/wsdl/analytics.wsdl#op.GetSupportedMetadata This function was used, but an AttributeError occurred.

from onvif import ONVIFCamera

cam = ONVIFCamera('192.168.100.133', 80, 'ID', 'P/W')
cam.create_analytics_service()

meta = cam.analytics.GetSupportedMetadata()
print(meta)

result:

Traceback (most recent call last):
  File "C:\Users\User\anaconda3\envs\py310\lib\site-packages\zeep\proxy.py", line 97, in __getitem__
    return self._operations[key]
KeyError: 'GetSupportedMetadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\JetBrains\PyCharmCE2021.2\scratches\meta_data.py", line 24, in <module>
    meta = cam.analytics.GetSupportedMetadata()
  File "C:\Users\User\anaconda3\envs\py310\lib\site-packages\onvif\client.py", line 167, in __getattr__
    return self.service_wrapper(getattr(self.ws_client, name))
  File "C:\Users\User\anaconda3\envs\py310\lib\site-packages\zeep\proxy.py", line 88, in __getattr__
    return self[key]
  File "C:\Users\User\anaconda3\envs\py310\lib\site-packages\zeep\proxy.py", line 99, in __getitem__
    raise AttributeError("Service has no operation %r" % key)
AttributeError: Service has no operation 'GetSupportedMetadata'

I need your help.

YahiaIono commented 4 months ago

Is there any solution for this issue ?