You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using translate for a discord bot, and when I put with a deepL free API key, it is not translate and when i did error logging I got An error occurred: Expecting value: line 1 column 1 (char 0)
I tried official given code in the PyPI page but it also not working, it gives error:
Traceback (most recent call last):
File "/home/funz/testing.py", line 9, in
translated_text = translator.translate('the book is on the table')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/funz/end/lib/python3.11/site-packages/translate/translate.py", line 45, in translate
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/funz/end/lib/python3.11/site-packages/translate/translate.py", line 45, in
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/funz/end/lib/python3.11/site-packages/translate/providers/deepl.py", line 48, in get_translation
return data["translations"][0]["text"]
~~~~^^^^^^^^^^^^^^^^
KeyError: 'translations'
I think this error might be same reason why bot's script also won't translate.
The text was updated successfully, but these errors were encountered:
I am using translate for a discord bot, and when I put with a deepL free API key, it is not translate and when i did error logging I got
An error occurred: Expecting value: line 1 column 1 (char 0)
I tried official given code in the PyPI page but it also not working, it gives error:
Traceback (most recent call last):
File "/home/funz/testing.py", line 9, in
translated_text = translator.translate('the book is on the table')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/funz/end/lib/python3.11/site-packages/translate/translate.py", line 45, in translate
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/funz/end/lib/python3.11/site-packages/translate/translate.py", line 45, in
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/funz/end/lib/python3.11/site-packages/translate/providers/deepl.py", line 48, in get_translation
return data["translations"][0]["text"]
~~~~^^^^^^^^^^^^^^^^
KeyError: 'translations'
I think this error might be same reason why bot's script also won't translate.
The text was updated successfully, but these errors were encountered: