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

The Chinese version of Azure uses DocumentTranslation to prompt that there is no such resource group #95

Open
e4je opened this issue Jun 10, 2022 · 7 comments

Comments

@e4je
Copy link

e4je commented Jun 10, 2022

image
Hello developer, I have tried according to the document for a long time, and found that on the Chinese version of Azure, there will be an error message that there is no such resource group. No matter what, I can't solve it. I would like to ask if this version cannot be used.

@chriswendt1
Copy link
Member

Hi @e4je ,
The Document Translation service is not deployed yet in Azure China. It just reached general availability in public Azure, that means it will be deployed in China within the next two months or so.
I leave this issue open until then, and resolve it when I learned that Document Translation has been deployed in Azure China.

Please submit an issue at the time, if you still have trouble. I'd be interested in your observation whether the app works in Azure China, after Document Translation has been deployed there.

@e4je
Copy link
Author

e4je commented Jun 11, 2022

Thanks a lot, I will test it when deploying to Azure China

@zjunsen
Copy link

zjunsen commented Sep 27, 2022

Hello, document translation has been deployed in China. When will this tool be updated to support China?

@chriswendt1
Copy link
Member

Hi @zjunsen ,
The tool is designed to work with any Azure region.
What are you observing? Where is it failing?

@zjunsen
Copy link

zjunsen commented Sep 28, 2022

Hi @zjunsen , The tool is designed to work with any Azure region. What are you observing? Where is it failing?

I created a translation service in China East 2, and the pricing layer is S1 standard. After the tool saves the settings, the test prompts: resource not found.
It's the same as the sticker error on the question post.

@micli
Copy link

micli commented Oct 5, 2022

Hi @chriswendt1 and @e4je :
I've debugged Documentation Translation UI line by line. The 404 error that e4je mentioned before raised by TryPaidSubscription() which is located at TestCredentials.cs .

The root cause is that Azure Mooncake did not deploy documentation translation API at all! It's easy to be verified by PostMan. Any APIs regarding documentation translation always returns 404 resource not found. At document center of Azure Mooncake, there is no articles describe documentation translation.

The only part of let user confusion is there is an documentation translation API endpoint shows at Azure Mooncake portal.
截屏2022-10-05 20 31 58

I thought Mr. Chris definitely did not test Mooncake service before release.

Thanks all!

@e4je
Copy link
Author

e4je commented Oct 11, 2022

Hi@micli
I tried Python to call the document translation endpoint and the call was successful and returned the expected result。
The following code is used
`import requests

endpoint = "https://Translate-no1.cognitiveservices.azure.cn/translator/text/batch/v1.0"
key = 'You Key'
path = '/batches'
constructed_url = endpoint + path

payload= {
"inputs": [
{
"source": {
"sourceUrl": "You Source AzureBlob Url",
"storageSource": "AzureBlob",
"language": "en",
},
"targets": [
{
"targetUrl": "You Azure Targets AzureBlob Url",
"storageSource": "AzureBlob",
"category": "general",
"language": "zh-Hans"
}
]
}
]
}
headers = {
'Ocp-Apim-Subscription-Key': key,
'Content-Type': 'application/json'
}

response = requests.post(constructed_url, headers=headers, json=payload)

print(f'response status code: {response.status_code}\nresponse status: {response.reason}\nresponse headers: {response.headers}')`

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

No branches or pull requests

4 participants