I’m calling GenerateJSONTemplate using markup and it is resulting in “Error occurred during generation process. Please contact support. Exception message: Attempted to divide by zero.”
I’ve attached my markup JSON file. It seems to have something to do with the answers_string value for the last question in the Markup.json file…but it is unclear what the problem is.
// code
var omrLicense = new License();
omrLicense.SetLicense(new FileStream(@"D:\dev\AsposeOmrTesting\AsposeOmrTesting\Aspose.OMR.Product.Family.lic", FileMode.Open));
var engine = new OmrEngine();
GenerationResult res = engine.GenerateJSONTemplate(@"D:\dev\AsposeOmrTesting\AsposeOmrTesting\DebugFiles\Markup.json");
// res.ErrorMessage at this point is: "Error occurred during generation process. Please contact support. Exception message: Attempted to divide by zero."
res.Save(@"D:\dev\AsposeOmrTesting\AsposeOmrTesting\DebugFiles", "Template");
//Markup JSON
{
"children": [
{
"element_type": "Page",
"children": [
{
"element_type": "EmptyLine"
},
{
"name": "1",
"align": "Left",
"element_type": "ChoiceBox",
"answers_string": "(1) Offensive, Defensive, and Stability Operations\r\n (2) Attack, Defend, and Screen\r\n (3) Movement to Contact, Raid, and Delibrate Attack\r\n (4) None of the Above\r\n ",
"question_text": "The primary land operations conducted by the Army are:"
},
{
"name": "3",
"align": "Left",
"element_type": "ChoiceBox",
"answers_string": "(1) True\r\n (2) False\r\n ",
"question_text": "When conducting a deliberate attack, the Grendier can employ smoke to mark friendly and\r\n enemy positions."
},
{
"name": "4",
"align": "Left",
"element_type": "ChoiceBox",
"answers_string": "(1) True. The team should always use the same formation as the Squad.\r\n (2) True. When the squad moves in a column of teams, the teams have better control when\r\n using a column formation.\r\n (3) False. Teams can use different formations from the squad, based on terrain.\r\n (4) False. Teams should use the Team line formation in order to maximize firepower to\r\n the front.\r\n ",
"question_text": "When executing a movement via a squad column, the fire teams should also move in column\r\n formation."
}
]
}
],
"element_type": "Template"
}
Any assistance would be greatly appreciated.