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
433 stars 144 forks source link

getting HTTP 503 error #115

Closed DavoodHakimi closed 1 year ago

DavoodHakimi commented 1 year ago

I'm running this simple code with python 3.11 and onvif 0.2.12 and i keep getting this error:

onvif.exceptions.ONVIFError: Unknown error: Server returned HTTP status 503 (no content available)

and this is my code :

from onvif import ONVIFCamera

mycam=ONVIFCamera('169.254.234.212',554,'admin','123456')

resp = mycam.devicemgmt.GetHostname()
print ('My camera`s hostname: ' + str(resp.Name))
dt = mycam.devicemgmt.GetSystemDateAndTime()
tz = dt.TimeZone
year = dt.UTCDateTime.Date.Year
hour = dt.UTCDateTime.Time.Hour