FalkTannhaeuser / python-onvif-zeep

ONVIF Client Implementation in Python 2+3 (using https://github.com/mvantellingen/python-zeep instead of suds as SOAP client)
MIT License
420 stars 137 forks source link

AttributeError: Service has no operation 'GetHostName' #79

Open guizilaile23 opened 3 years ago

guizilaile23 commented 3 years ago

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 !!!