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
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
File "C:\py38_64\lib\site-packages\translate\providers\microsoft.py", line 47, in get_translation
raise TranslationError(data["error"]["message"])
translate.exceptions.TranslationError: The request is not authorized because credentials are missing or invalid.
The text was updated successfully, but these errors were encountered:
For future sumblers upon this issue, I had this too - I had to modify the command to pass the region - in fact because I was doing this from the commandline - I had to modify main.py to allow passing the --region flag. Basically when you set up the Translator in Azure you choose a region and unless the Ocp-Apim-Subscription-Region header matches, you get an authentication error.
translator = Translator(provider='microsoft', secret_access_key='KEY1....', to_lang='eng',
from_lang='ch')
fails with
The text was updated successfully, but these errors were encountered: