python-vesync icon indicating copy to clipboard operation
python-vesync copied to clipboard

Error connecting: name resolution

Open mikecarr opened this issue 7 years ago • 1 comments
trafficstars

When running a python app from init.d I was getting connection errors and there seems to be no way of setting retries.

I eventually added some error handling retry login in my code, although not the best, it works

for i in range(0,50): while True: try: api = VesyncApi("username","mysupersecretpassword") except: time.sleep(2) logger.error("connection failure, retrying....") continue break

Error

vesync[418]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='smartapi.vesync.com', port=443): Max retries exceeded with url: /vold/user/login (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x762fb970>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

mikecarr avatar Jan 26 '18 22:01 mikecarr

@mikecarr the error indicates this was a problem with either your DNS config, or perhaps, on vesync's end. That domain resolves correctly from global recursors like 4.2.2.2. At any rate, this wouldn't be something that this project could fix, unfortunately.

jimbocoder avatar Jan 31 '18 05:01 jimbocoder