AttributeError: 'ONVIFCamera' object has no attribute 'devicemgmt'
See original GitHub issueI’ve not worked with onvif nor wsdl files before, trying to control a onvif compatible Tonton PTZ camera. Seems I just can’t seem to get any of the object attributes from the camera, any assistance would be greatly appreciated, also, how do I know where in the camera the wsdl file is actually stored as I’m using the default /etc/onvif/wsdl path?
from onvif import ONVIFCamera mycam = ONVIFCamera(‘192.168.1.101’, 80, ‘admin’, ‘admin’, ‘/etc/onvif/wsdl/’) resp = mycam.devicemgmt.GetHostname() print ('My camera`s hostname: ’ + str(resp.Name))
AttributeError: ‘ONVIFCamera’ object has no attribute ‘devicemgmt’
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
ONVIF Camera Questions - Home Assistant Community
I have been reading other topics about ONVIF camera errors, ... AttributeError: 'NoneType' object has no attribute 'getroottree'.
Read more >python-onvif-zeep - Bountysource
mycam = ONVIFCamera("192.168.10.180", 80, 'admin', 'admin') event_service ... AttributeError: 'NoneType' object has no attribute 'PanTilt'. Status is
Read more >onvif-zeep - PyPI
Python Client for ONVIF Camera. ... params = mycam.devicemgmt.create_type('SetHostname') ... ONVIFCamera has support methods to create new services::
Read more >onvif.exceptions.ONVIFError: Unknown error: No such file: /etc ...
Modify the following path /etc/onvif/wsdl/ to where you have the wsdl file. By default, you have it in ...
Read more >OnVif & Discovery — Python Media Streaming Framework for ...
So, use Zeep as your SOAP client, give it the WSDL file and that's about it. OnVif with Zeep¶. Rather than giving you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @westpirate , after reading through the issues dozens of times, I tried pasting the above devicemgmt.wsdl file into the following directory -
I think you should be able to get it up and running. The other issues that might arise are already discussed. I could PTZ control my IP cam.
Note: I am using a virtual environment called ‘env1’ on Ubuntu 16.04
Cheers, Abhilash
You can download the ONVIF WSDL files from this page.
For example, try saving
devicemgmt.wsdl
into a folder namedwsdl/
in your project folder: https://www.onvif.org/ver10/device/wsdl/devicemgmt.wsdl (right-click > Save Link Target As…)Then change the
'/etc/onvif/wsdl/'
parameter in theONVIFCamera()
constructor to'wsdl'
(if your main script is located just above thewsdl/
folder). The code sample should work once you do this.