BartyCrouch icon indicating copy to clipboard operation
BartyCrouch copied to clipboard

Error: Translation request failed with error: The operation couldn’t be completed. (Microya.JsonApiError error 1.)

Open ppcharlier opened this issue 4 years ago • 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

  1. Add string to source language
  2. enter configuration in toml file (secret, I tried both subscription id and the 2 API keys)
  3. build

Specifications

  • Version: 4.2.0
  • Platform: macOS
  • IDE Version: Version 11.5 (11E608c)

ppcharlier avatar May 29 '20 03:05 ppcharlier

Unfortunately I have the same problem 😔

jxa13 avatar Jun 01 '20 00:06 jxa13

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.

jtruher avatar Jun 10 '20 19:06 jtruher

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 :-/

ppcharlier avatar Jun 11 '20 16:06 ppcharlier

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.

jtruher avatar Jun 11 '20 23:06 jtruher

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.

scottsymes avatar Jul 29 '20 23:07 scottsymes

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!

Danbana avatar Jan 18 '21 04:01 Danbana

Azure Global

Yup, just needed to select Global as region and then it works just fine.

tyirvine avatar Aug 10 '21 23:08 tyirvine