Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ppcharlier opened this issue May 29, 2020 · 7 comments
Labels

Comments

@ppcharlier
Copy link

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 ppcharlier added the bug label May 29, 2020
@0xJxa
Copy link

0xJxa commented Jun 1, 2020

Unfortunately I have the same problem 😔

@jtruher
Copy link

jtruher commented Jun 10, 2020

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.

@ppcharlier
Copy link
Author

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

@jtruher
Copy link

jtruher commented Jun 11, 2020

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.

@scottsymes
Copy link

scottsymes commented Jul 29, 2020

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.

@Danbana
Copy link

Danbana commented Jan 18, 2021

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!

@tyirvine
Copy link

Azure Global

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants