Giter VIP home page Giter VIP logo

goslate's People

Contributors

yepoleb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

goslate's Issues

Too many requests (Error 429)

I am using the goslate API to translate text from kannada to English, but I get a 429 Too many requests error , is there any way to resolve this issue ?
(Is the maximum number of requests this API can handle 100 per hour ?)

503 Unavailable error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.