We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Deepl is not stable. Sometimes it works fine, sometimes it gives an error (see below)
5.5.6
=3.6, <=3.8
Linux Ubuntu
US
import translators as ts print(ts.translate_text(query_text='To be, or not to be, that is the question!', to_language='ru', translator='deepl'))
output:
--------------------------------------------------------------------------- HTTPError Traceback (most recent call last) <ipython-input-6-428c3aab60d7> in <module> 1 import translators as ts 2 #import translators.server as tss ----> 3 print(ts.translate_text(query_text='To be, or not to be, that is the question!', to_language='ru', translator='deepl')) 4 frames /usr/local/lib/python3.8/dist-packages/translators/server.py in translate_text(self, query_text, translator, from_language, to_language, **kwargs) 3113 if translator not in self.translators_pool: 3114 raise TranslatorError -> 3115 return self.translators_dict[translator](query_text=query_text, from_language=from_language, to_language=to_language, **kwargs) 3116 3117 def translate_html(self, /usr/local/lib/python3.8/dist-packages/translators/server.py in _wrapper(*args, **kwargs) 96 sys.stderr.write(f'CostTime(function: {func.__name__[:-4]}): {cost_time}s\n') 97 return result ---> 98 return func(*args, **kwargs) 99 return _wrapper 100 /usr/local/lib/python3.8/dist-packages/translators/server.py in _wrapper(*args, **kwargs) 223 new_args[1] = query_text 224 return func(*tuple(new_args), **kwargs) --> 225 return func(*args, **{**kwargs, **{'query_text': query_text}}) 226 return _wrapper 227 /usr/local/lib/python3.8/dist-packages/translators/server.py in deepl_api(self, query_text, from_language, to_language, **kwargs) 1768 1769 r_cs = self.session.post(self.api_url, params=self.params['handle'], json=h_data, headers=self.api_headers, timeout=timeout, proxies=proxies) -> 1770 r_cs.raise_for_status() 1771 data = r_cs.json() 1772 time.sleep(sleep_seconds) /usr/local/lib/python3.8/dist-packages/requests/models.py in raise_for_status(self) 1019 1020 if http_error_msg: -> 1021 raise HTTPError(http_error_msg, response=self) 1022 1023 def close(self): HTTPError: 429 Client Error: for url: https://www2.deepl.com/jsonrpc?method=LMT_handle_jobs
### Screenshots ```Markdown ![DESCRIPTION](LINK.png)
The text was updated successfully, but these errors were encountered:
@diwert-ai Yeah. At some point deepl will trigger a captcha, and api requests without captcha validation will be forbidden.
Sorry, something went wrong.
Is there any fix to this?
@reddere Not yet
@reddere Bro, please try pip install --upgrade translators==5.8.7
pip install --upgrade translators==5.8.7
UlionTse
No branches or pull requests
Debug Tips
What happened?
Deepl is not stable. Sometimes it works fine, sometimes it gives an error (see below)
APP Version
5.5.6
Python Version
Runtime Environment
Linux Ubuntu
Country/Region
US
Relevant log output
output:
Code of Conduct
The text was updated successfully, but these errors were encountered: