I have an excel table which am importing the data into Dataverse table. There are few columns in excel which can be in different language and am trying to convert them into English using Microsoft Translator V3 connector. Somehow the action throws below error intermittently while converting the text.
{
"error": {
"message": "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.\r\nTo 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<T>) 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.\r\nPath 'error', line 1, position 9.",
"stackTrace": [
"at System.Object CreateObject(Newtonsoft.Json.JsonReader, System.Type, Newtonsoft.Json.Serialization.JsonContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty, System.Object) : Line 0",
"at System.Object CreateValueInternal(Newtonsoft.Json.JsonReader, System.Type, Newtonsoft.Json.Serialization.JsonContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty, System.Object) : Line 0",
"at System.Object Deserialize(Newtonsoft.Json.JsonReader, System.Type, Boolean) : Line 0",
"at System.Object DeserializeInternal(Newtonsoft.Json.JsonReader, System.Type) : Line 0",
"at System.Object DeserializeObject(System.String, System.Type, Newtonsoft.Json.JsonSerializerSettings) : Line 0",
"at T DeserializeObject[T](System.String, Newtonsoft.Json.JsonSerializerSettings) : Line 0",
"at T DeserializeObject[T](System.String) : Line 0",
"at Void MoveNext() : Line 0",
"at Void Throw() : Line 0",
"at Void ThrowForNonSuccess(System.Threading.Tasks.Task) : Line 0",
"at Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) : Line 0",
"at TResult GetResult() : Line 0",
"at Void MoveNext() : Line 0",
"at Void Throw() : Line 0",
"at Void ThrowForNonSuccess(System.Threading.Tasks.Task) : Line 0",
"at Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) : Line 0",
"at TResult GetResult() : Line 0",
"at Void MoveNext() : Line 0"
]
}
}
Action Inputs below. Similar text in other rows of the excel table is able to convert without any error. Couldn't figure what is going wrong here.
The action configuration below.
Really appreciate the help form community members. Thanks a lot in advance.
Regards,
Ramesh
Hi,
I faced this issue recently and at my end, issue was with configuration of connection. In the Azure Cognitive Service Connection -> Microsoft Translator V3 connection, I had used API endpoint instead of using the azure resource name. Once i provided the actual name of resource instead of API endpoint, it started working.
Thanks.
Please help members!!