Error: Translation request failed with error: The operation couldn’t be completed. (Microya.JsonApiError error 1.)
ppcharlier opened this issue · 7 comments
Expected Behavior
translation using Microsoft Translator API
Actual Behavior
Keep empty translations and say "Found empty value for key ..."
Steps to Reproduce the Problem
- Add string to source language
- enter configuration in toml file (secret, I tried both subscription id and the 2 API keys)
- build
Specifications
- Version: 4.2.0
- Platform: macOS
- IDE Version: Version 11.5 (11E608c)
Unfortunately I have the same problem 😔
I was able to resolve this by recreating a new Azure instance in the Global domain. As near as I can tell, based on this document, bartycrouch is expecting to hit api.cognitive.microsofttranslator.com
.
Hi, Could you please explain or link an explanation on how to create an Azure instance in global domain ? Every time I try to create one it’s in a dedicated endpoint :-/
I was able to do it, or something a lot like it, with instructions from here. I had a failed first attempt at setting it to Global and struggled a little bit with their UI. Things seemed to fail for no obvious reason.
Seems to be related to Auth of a global versus Regional resource:
The regional resource requires an additional parameter Ocp-Apim-Subscription-Region
:
-H "Ocp-Apim-Subscription-Key:<your-key>" \
-H "Ocp-Apim-Subscription-Region:<your-region>" \
-H "Content-Type: application/json" \
-d "[{'Text':'Hello, what is your name?'}]"
Microsoft Azure Docs for reference:
Global Resource
Regional Resource
Adding an additional param in BartyCrouch could solve this. Until then resources need to be created as Global.
I was able to resolve this by recreating a new Azure instance in the Global domain. As near as I can tell, based on this document, bartycrouch is expecting to hit
api.cognitive.microsofttranslator.com
.
I was able to get the translation working when I recreated the resource as global.
Magical to see the automatic translation!
Well done Barty!