Closed ali1hammoud closed 1 year ago
I wrote this code: ts.translate_text('hello, how are you?', translator='iciba', from_language='en', to_language='ar')
ts.translate_text('hello, how are you?', translator='iciba', from_language='en', to_language='ar')
5.7.1
3.10
colab google
Russia
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-16-abfc787020dd> in <cell line: 1>() ----> 1 ts.translate_text('hello, how are you?', translator='iciba', from_language='en', to_language='ar') 3 frames /usr/local/lib/python3.10/dist-packages/translators/server.py in iciba_api(self, query_text, from_language, to_language, **kwargs) 2310 time.sleep(sleep_seconds) 2311 self.query_count += 1 -> 2312 return data if is_detail_result else data['content'] if data.get('isSensitive') == 1 else data['content']['out'] 2313 2314 KeyError: 'content'
Hello fiend, What is your Runtime Environment?
I updated the library to 5.7.6 Collecting translators Downloading translators-5.7.6-py3-none-any.whl (41 kB) and now it is working.
Collecting translators Downloading translators-5.7.6-py3-none-any.whl (41 kB)
Thank you.
Debug Tips
What happened?
I wrote this code:
ts.translate_text('hello, how are you?', translator='iciba', from_language='en', to_language='ar')
APP Version
5.7.1
Python Version
3.10
Runtime Environment
colab google
Country/Region
Russia
Relevant log output
Code of Conduct