invoke py_translator.Translator().translate method, an error occured.
File "/usr/local/lib/python3.6/dist-packages/py_translator/client.py", line 172, in translate
data = self._translate(text, dest, src)
File "/usr/local/lib/python3.6/dist-packages/py_translator/client.py", line 75, in _translate
token = self.token_acquirer.do(text)
File "/usr/local/lib/python3.6/dist-packages/py_translator/gtoken.py", line 184, in do
self._update()
File "/usr/local/lib/python3.6/dist-packages/py_translator/gtoken.py", line 56, in _update
self.tkk = self.RE_TKK.findall(r.text)[0]
by the way, an error occurs also command line not only python code.
$ translate fr <<< 'I think therefore I am'
Traceback (most recent call last):
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/translate/coroutines.py", line 170, in spool
stream = yield
GeneratorExit
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/translate/coroutines.py", line 145, in set_task
task = yield
GeneratorExit
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/projects/a_soft/venv/bin/translate", line 11, in <module>
sys.exit(main())
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/translate/__main__.py", line 115, in main
return source(spool(set_task(translate, translit=args.translit)), args.text)
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/translate/coroutines.py", line 204, in source
return target.close()
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/translate/coroutines.py", line 180, in spool
iterable.close()
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/translate/coroutines.py", line 149, in set_task
list(map(stream, workers.map(translator, queue)))
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
yield fs.pop().result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/translate/translator.py", line 51, in connection
response.raise_for_status()
File "/home/user/projects/a_soft/venv/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: https://translate.google.com/translate_a/single?client=a&ie=utf-8&oe=utf-8&dt=t&tl=fr&q=I+think+therefore+I+am%0A