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

How to use this library?

Open weneedred1-stack opened this issue 1 month ago • 1 comments

I tried using this library to manually connect to my camera by following the README.md

python3
>>> import asyncio
from onvif import ONVIFCamera
mycam = ONVIFCamera('192.168.0.2', 80, 'user', 'passwd', '/etc/onvif/wsdl/')
await mycam.update_xaddrs()

But the /etc/onvif/wsdl wasn't found naturally I got it from: https://github.com/onvif/specs.git and had to manually copy the devicemgmt.wsdl from specs/wsdl/ver10/device/wsdl/

Now I'm getting another error:

RuntimeError: Loading /ver10/schema/onvif.xsd is not supported in async mode

Is it not possible to simply use this library directly??

weneedred1-stack avatar Jan 08 '26 12:01 weneedred1-stack

The library already contains the wsdl directory just use that as path instead (inside the dist-packages for your python libraries)

You won't get an error that way.

DrissiReda avatar Jan 08 '26 16:01 DrissiReda