python-onvif-zeep icon indicating copy to clipboard operation
python-onvif-zeep copied to clipboard

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

Open Oh-JongJin opened this issue 2 years ago • 1 comments

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.

Oh-JongJin avatar Aug 17 '22 07:08 Oh-JongJin

Is there any solution for this issue ?

YahiaIono avatar Mar 04 '24 11:03 YahiaIono