terryyin / translate-python

Online translation as a Python module & command line tool. No key, no authentication needed.
MIT License
729 stars 153 forks source link

Service unavailable #25

Closed ghost closed 7 years ago

ghost commented 7 years ago

It seems to don't work anymore. This is the result of running the example in the doc

Traceback (most recent call last):
  File "C:\data\progetti_miei\python\translate\main.py", line 3, in <module>
    translation = translator.translate("This is a pen.")
  File "C:\Python36\lib\site-packages\translate.py", line 38, in translate
    return ' '.join(self._get_translation_from_google(s) for s in self.source_list)
  File "C:\Python36\lib\site-packages\translate.py", line 38, in <genexpr>
    return ' '.join(self._get_translation_from_google(s) for s in self.source_list)
  File "C:\Python36\lib\site-packages\translate.py", line 41, in _get_translation_from_google
    json5 = self._get_json5_from_google(source)
  File "C:\Python36\lib\site-packages\translate.py", line 54, in _get_json5_from_google
    r = request.urlopen(req)
  File "C:\Python36\lib\urllib\request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python36\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "C:\Python36\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python36\lib\urllib\request.py", line 570, in error
    return self._call_chain(*args)
  File "C:\Python36\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "C:\Python36\lib\urllib\request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
terryyin commented 7 years ago

seems the service is back.

terryyin commented 7 years ago

Therefore I'm closing this issue.