I'm trying to run a script in python for a little project that requires also translation and I've my API key from DeepL API defined
DEEPL_API_KEYS = ['example987654321:fx']
Everything on the script is working fine without DeepL but we really need to get the translations in. The problem is that due to my noobness I can't seem to make heads or tails of the following Authorization failure:
Traceback (most recent call last):
Traceback (most recent call last):
File "/Users/.../sample.py", line x, in <module>
main()
File "/Users/.../sample.py", line x, in main
translated_body = translate_text(body)
File "/Users/.../sample.py", line x, in translate_text
result = translator.translate_text(text, target_lang=target_lang, formality=formality)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/deepl/translator.py", line 455, in translate_text
self._raise_for_status(status, content, json)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/deepl/translator.py", line 184, in _raise_for_status
raise AuthorizationException(
deepl.exceptions.AuthorizationException: Authorization failure, check auth_key