Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

503 Unavailable error #1

Open
aferriss opened this issue Apr 28, 2016 · 0 comments
Open

503 Unavailable error #1

aferriss opened this issue Apr 28, 2016 · 0 comments

Comments

@aferriss
Copy link

Hi I'm getting an error when trying the most basic example code. Maybe google changed their api?

import goslate
gs = goslate.Goslate()
print(gs.translate('hello', 'de'))
Traceback (most recent call last):
  File "t.py", line 3, in <module>
    print(gs.translate('baguette', 'fr'))
  File "/usr/local/lib/python2.7/site-packages/goslate.py", line 409, in translate
    return _unwrapper_single_element(self._translate_single_text(text, target_language, source_language))
  File "/usr/local/lib/python2.7/site-packages/goslate.py", line 334, in _translate_single_text
    results = list(self._execute(make_task(i) for i in split_text(text)))
  File "/usr/local/lib/python2.7/site-packages/goslate.py", line 203, in _execute
    yield each()
  File "/usr/local/lib/python2.7/site-packages/goslate.py", line 332, in <lambda>
    return lambda: self._basic_translate(text, target_language, source_lauguage)[0]
  File "/usr/local/lib/python2.7/site-packages/goslate.py", line 251, in _basic_translate
    response_content = self._open_url(url)
  File "/usr/local/lib/python2.7/site-packages/goslate.py", line 181, in _open_url
    response = self._opener.open(request, timeout=self._TIMEOUT)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 503: Service Unavailable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant