translation icon indicating copy to clipboard operation
translation copied to clipboard

TranslateError: No translation get, you may retry

Open ChillarAnand opened this issue 7 years ago • 5 comments

The default example fails with

In [6]: print(baidu('hello world!', dst = 'ru'))
---------------------------------------------------------------------------
TranslateError                            Traceback (most recent call last)
<ipython-input-6-62aeea8f76b9> in <module>()
----> 1 print(baidu('hello world!', dst = 'ru'))

/home/chillaranand/.virtualenvs/py35/lib/python3.5/site-packages/translation/__init__.py in baidu(text, src, dst, proxies)
     26 def baidu(text, src = None, dst = None, proxies = None):
     27     return t.get(text, default = 'baidu', src = src,
---> 28         dst = dst, proxies = proxies)
     29 def bing(text, src = None, dst = None, proxies = None):
     30     return t.get(text, default = 'bing', src = src,

/home/chillaranand/.virtualenvs/py35/lib/python3.5/site-packages/translation/main.py in get(self, text, default, src, dst, proxies)
     31         test_proxies(proxies, default)
     32         r =  TRANSLATION_DICT[default](text, src, dst, proxies)
---> 33         if r == '': raise TranslateError('No translation get, you may retry')
     34         return r
     35     def get_all(self, text, default = None, src = None,

TranslateError: No translation get, you may retry

ChillarAnand avatar May 23 '17 08:05 ChillarAnand