Giter Site home page Giter Site logo

translation's People

Contributors

littlecodersh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

translation's Issues

TranslateError: No translation get, you may retry

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

Bing Translator not working

Bing translator not working from last few days, getting error

translation.exception.TranslateError: No translation get, you may retry

google翻译问题

google翻译返回结果 json 解析后可能是 list,也可能是字符串。

如果是字符串,返回的结果就有问题了,会只返回第一个字符,比如这个:

2016-07-10 10 58 44

ConnectionRefusedError

你好!
我试了这段code:
from translation import google, ConnectError
try:
print(google('hello world!', dst = 'zh-CN', proxies = {'http': '127.0.0.1:1080'}))
except ConnectError:
print('Invaild proxy')
但是总是出现ConnectionRefusedError。请问是为什么呢?proxy 不对吗?
我试这段
from translation import baidu, google, youdao, iciba
print(google('hello world!', dst = 'zh-CN'))
print(google('hello world!', dst = 'ru'))
print(baidu('hello world!', dst = 'zh'))
print(baidu('hello world!', dst = 'ru'))
print(youdao('hello world!', dst = 'zh-CN'))
print(iciba('hello world!', dst = 'zh'))
print(bing('hello world!', dst = 'zh-CHS'))
则出现TranslateError, 您知道为什么吗?
提前感谢您的回答!

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.