tylergets / python-vesync

VeSync API Wrapper in Python. Used by EtekCity Smart Wifi Outlets.
MIT License
31 stars 17 forks source link

Error connecting: name resolution #2

Open mikecarr opened 6 years ago

mikecarr commented 6 years ago

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',))

jimbocoder commented 6 years ago

@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.