You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2021-07-09 10:17:09,685] sopel.bot ERROR - Unexpected error (HTTPSConnectionPool(host='translate.googleapis.com', port=443): Max retries exceeded with url: /translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=hormiga (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f379c6ddd00>, 'Connection to translate.googleapis.com timed out. (connect timeout=40)'))) from Ant at 2021-07-09 17:17:09.685340. Message was: .translate hormiga
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 156, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/lib/python3.9/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 300, in connect
conn = self._new_conn()
File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 161, in _new_conn
raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.VerifiedHTTPSConnection object at 0x7f379c6ddd00>, 'Connection to translate.googleapis.com timed out. (connect timeout=40)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='translate.googleapis.com', port=443): Max retries exceeded with url: /translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=hormiga (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f379c6ddd00>, 'Connection to translate.googleapis.com timed out. (connect timeout=40)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ant/.local/lib/python3.9/site-packages/sopel/bot.py", line 757, in call_rule
rule.execute(sopel, trigger)
File "/home/ant/.local/lib/python3.9/site-packages/sopel/plugins/rules.py", line 1057, in execute
exit_code = self._handler(bot, trigger)
File "/home/ant/.local/lib/python3.9/site-packages/sopel/modules/translate.py", line 174, in tr2
msg, src = translate(phrase, src, dest)
File "/home/ant/.local/lib/python3.9/site-packages/sopel/modules/translate.py", line 59, in translate
result = requests.get(url, params=query, timeout=40, headers=headers).text
File "/usr/lib/python3.9/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 504, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='translate.googleapis.com', port=443): Max retries exceeded with url: /translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=hormiga (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f379c6ddd00>, 'Connection to translate.googleapis.com timed out. (connect timeout=40)'))
The timeout error is clearly a network error between your server and the google translate API. Nothing we (Sopel) can do about it. You'll have to ask your hosting service for that.
Description
Sopel's translate command shows "Unexpected error
(HTTPSConnectionPool(host='translate.googleapis.com', port=443): Max
retries exceeded with url:
/translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=..."
Reproduction steps
With Sopel v7.1.1 (Python v3.9.5) running, do a translate command like:
Expected behavior
It should give me a non-error result of translation like:
Logs
Environment
.version
: [7.1.1]/version
: [ircd-ratbox-3.0.8(20121231_3-27427)]Notes
I do not have su(do)/root access so it is done locally in my local Linux account. :)
The text was updated successfully, but these errors were encountered: