简体   繁体   中英

onvif.exceptions.ONVIFError: Unknown error: No such file: /etc/onvif/wsdl/devicemgmt.wsdl

I have bought a V380 ip camera avaiable at https://www.daraz.pk/products/i1977066-s1481128974.html?urlFlag=true&mp=1 . I am trying to implement onvif client in Python. When I run the following code

from onvif import ONVIFCamera

mycam = ONVIFCamera('192.168.10.12', 8899, 'admin', '', '/etc/onvif/wsdl/')
resp = mycam.devicemgmt.GetHostname()
print( 'My camera`s hostname: ' + str(resp.Name))

I get following error

onvif.exceptions.ONVIFError: Unknown error: No such file: /etc/onvif/wsdl/devicemgmt.wsdl

Modify the following path /etc/onvif/wsdl/ to where you have the wsdl file. By default, you have it in /usr/local/lib/python3.8/site-packages .

if you are using environments, check /your env/lib/python3.8/site-packages/wsdl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM