hhhwwwuuu / BackTranslation

back translation for NLP
https://pypi.org/project/BackTranslation/
MIT License
25 stars 2 forks source link

{'error_code': '54003', 'error_msg': 'Invalid Access Limit'} #5

Closed LiZhangMing closed 3 years ago

LiZhangMing commented 3 years ago

from BackTranslation import BackTranslation_Baidu trans = BackTranslation_Baidu(appid='xxx', secretKey='xxx') result = trans.translate('好吧,你可以理解他的想法,但我们不能用金钱来考验家庭的感情,', src='auto', tmp='en') print(result.result_text) trans.closeHTTP()

We use the code as above ,but It reply me "{'error_code': '54003', 'error_msg': 'Invalid Access Limit'}"

hhhwwwuuu commented 3 years ago

你好,根据错误代码。应该是请求频率超过限制了。 请确保在百度翻译开放平台注册并申请通用翻译API服务。 https://fanyi-api.baidu.com/product/11

此外,在调用百度api中出现一个bug。 可更新至最新版本0.3.1 pip install -U BackTranslation