HTTPSConnectionPool(host='aip.baidubce.com', port=443): Max retries exceeded with url: /oauth/2.0/token?grant_type=client_credentials&client_id=XXXXXXXXXlient_secret=XXXXXXXXX (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fbaa4232048>: Failed to establish a new connection: [Errno -3] Try again'))
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 57, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 344, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 316, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fbaa4232048>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='aip.baidubce.com', port=443): Max retries exceeded with url: /oauth/2.0/token?grant_type=client_credentials&client_id=XXXXXXXXXlient_secret=XXXXXXXXX (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fbaa4232048>: Failed to establish a new connection: [Errno -3] Try again'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/usr/src/homeassistant/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 143, in async_say_handle
options=options
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 312, in async_get_url
engine, key, message, use_cache, language, options)
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 324, in async_get_tts_audio
message, language, options)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/baidu/tts.py", line 129, in get_tts_audio
message, language, 1, speech_data
File "/usr/local/lib/python3.7/site-packages/aip/speech.py", line 92, in synthesis
result = self._request(self.__ttsUrl, data)
File "/usr/local/lib/python3.7/site-packages/aip/base.py", line 91, in _request
authObj = self._auth()
File "/usr/local/lib/python3.7/site-packages/aip/base.py", line 167, in _auth
), proxies=self._proxies).json()
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='aip.baidubce.com', port=443): Max retries exceeded with url: /oauth/2.0/token?grant_type=client_credentials&client_id=XXXXXXXXXlient_secret=XXXXXXXXX (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fbaa4232048>: Failed to establish a new connection: [Errno -3] Try again')