Reputation: 129
I am trying to user power automate to translate some text. I get an "InternalServerError" with a further explanation
'Translate_text' failed: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[Microsoft.PowerPlatform.ConnectorPlatform.CustomCodeConnector.CSharpScript.InProcess.Script+TranslationResult]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'statusCode', line 1, position 15.
The passed in text to the translator is already in an array format
[
{
"Text": "Hello. My name is Joe. What is your name?"
}
]
When I try to validate that the API resource in Azure is working - I am not able to get this to work either - I am testing out the "Try it dialog" (so I suspect that there is some sort of configuration issue)
Appreciate any help anyone can offer in figuring this out :)
EDIT
Added an image from the Azure market place about the API
Upvotes: 0
Views: 226
Reputation: 10370
Microsoft Azure translators error "Translation failed. Please try again later.
I followed this MS-Document,
In the official document, they mentioned you need to create the translator with global
region.
Even, when I tried with west Europe
region, I got the same internal server error.
In my environment, I created translator with global
region.
Portal:
Power Automate:
I followed the same steps in the document, and it translated the text from English
to Spanish
successfully in Power automate.
Upvotes: 1