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

AttributeError: Service has no operation 'GetHostName'

Open guizilaile23 opened this issue 4 years ago • 0 comments

hey guys, i already installed the onvif-zeep the code bellow have no error mycam = ONVIFCamera('192.168.1.10', 8899, 'admin', 'se1988', './wsdl') media_service = mycam.create_media_service() profiles = media_service.GetProfiles()

but the examples of readme page about ' mycam.devicemgmt.GetHostName()' raise error, and i alread download the wsdl files as the last replay in https://github.com/FalkTannhaeuser/python-onvif-zeep/issues/63

and it's still not work.

after that, i try to change the HostName first using the code below

device_service = mycam.create_devicemgmt_service() params = device_service.create_type('SetHostname') params.Hostname = 'NewHostName' device_service.SetHostname(params) and i got this error:

onvif.exceptions.ONVIFError: Unknown error: The Token type doesn't accept collections as value

my goal is get the envets information using python-onvif, and failed to read the HostName makes me doubt whether the onvif_zeep is correct.

i have test two dahua ip cameras and one Xiongmai IP camera, none of them works. and i also test the code on PC and Nvidia Xavier and Nvidia Jetson Nano, none of them works. does anyone have any idea?

thank you very much !!!

guizilaile23 avatar May 10 '21 16:05 guizilaile23