Cloud Development Kit

WebSockets - Internal Message Error

Hi,

I'm facing a problem regarding to text recognition via websockets protocol.

After successful connection I'm sending a "start" message which contain a word "Hello", but the response from the server is:

 

{"type":"error","error":{"result":{"message":"Internal Message Error"}}}

 message I'm sending is:

{"type":"start","textParameter":{"language":"en_US"},"inputUnits":[{"textInputType":"MULTI_LINE_TEXT","components":[{"type":"stroke","x":[247.30075373793719,246.8782411768864,246.96571479407336,247.07936272445113,246.96343767300402,246.88951358534155,246.8581829192823,247.0248746280506,246.6798472524889,246.64840586821828,246.77573133533687,247.22490222526875,246.81833334530955,245.91586708600468,259.09115942926604,282.38427440149906,291.7898264032728,303.61953109834303,313.49792186801767,322.64413974780126,320.63576559851424,323.36156224810725,309.270575535134,283.522688628967,273.0748210658498,277.6016942187039,283.7702497432208,297.4185474053114,319.85072232006337,348.3996167322447,388.6626047732843,407.62752873483413,416.2542026318276,412.01777235151036,402.41538450111904,393.1049633179227,383.46326171645075,381.215618459261,379.76455066464735,376.60298231684095,376.72713879756867,381.73608022949765,390.3658250255603,403.55546697591615,428.0981936954849,440.14812518408564,457.06540874396995,468.1896766742248,474.6786151118679,470.7981982574669,463.76729731882585,458.3024056017299,458.94529944721745,464.5972792408856,469.357287867451,484.0455544449688,496.94965726228634,514.4454685991446,532.6308977492573,547.7852278714146,570.3114852039562,574.927466534996,572.3715975805989,561.7567203314985,556.1867470312336,555.1890063951463,553.3411084303617,555.6001887147647,561.2345518844209,569.4884442583118,580.6287713336008,593.481487527383,609.225305155882,635.8973592738266,649.9212315790065,651.2071125152639,668.5582841559834,662.7039904355601,655.4298013497737,645.6354020324111,648.1243941945921,645.4799118276183,649.4665814870556,648.3321716569404,661.7721568116073,679.6593083380221,699.5883198601389,733.1970346527444,759.7652923770754,788.7577307730736,793.7838889052638,781.2343953722881,768.1229667473051,753.0410013398312,751.2156048489003,761.2452168675959,778.0543225313654,793.9996453908616,801.8337203210468,800.3305856934649,795.7014101925246,796.91518314299,801.3527847058892,816.2407105449047,835.2353923816338,854.2887297141478,864.6234182742161],"y":[579.3882285067102,579.1901287006643,579.721933074119,579.7128825164891,580.0867587787743,579.8198194377647,579.8509147734383,580.3141507792521,580.9072184459562,580.3016089672483,580.1772029077317,579.9864462760517,579.5122709337519,575.5370337173648,552.6786491062256,538.1753501118408,543.3072864492017,551.5623829014645,573.8829380131033,601.0815255425534,645.1188031211083,693.4439457897168,726.2150956075621,737.6786858591477,717.975980741649,701.4693508769809,675.9143783872775,650.2286596051008,636.5413578940585,621.6042227213779,591.2145586718077,572.0434888272596,551.7820111644701,538.5971744862625,520.2231931460498,516.560007177146,524.072681984612,557.4104628686289,592.008803162749,633.5444027616873,667.6390792938721,696.4586816220769,715.4462636014493,726.6079296252757,716.3077094079525,708.6325501791509,680.640074291629,649.3618969095872,623.2730374594703,610.3520376580268,610.0763392004005,627.1636608493596,652.0672176850213,692.50254598739,704.4927029039137,716.1306702352597,721.650625053107,707.3355421128797,679.1198811332195,641.3167251119783,588.2446859338904,552.1853425093005,527.4425389185648,510.48305621209795,515.6927625235066,541.8091352435567,579.2470610025765,620.9522877870855,659.8945713199056,693.6687322445306,715.7482600142376,716.7193948152161,699.2384572364946,649.0156204474954,605.9029249963945,579.931184478009,525.8641925726693,510.16481023926485,506.940672216221,527.0201318310578,548.0697739515554,584.9130581603512,643.2222397992172,668.3645184118064,690.3937008062011,694.6804462113508,697.4008919609063,652.7834168369263,625.6812871103498,594.4206150247999,589.6038708795959,592.8902763747806,608.2149767638597,650.0517972029032,681.9021261546993,705.6346574369484,713.4711690182612,701.3707790877083,670.2808502298934,621.367028446107,597.7165025403294,587.0490030882704,589.1545954636146,597.6427414836444,607.8404281387543,615.2255215408368,615.3314716622083]}]}],"userId":"my@mail.com","containerId":"id1","containerType":"FORM"} 

 any idea where is the problem?


Thanks,

Ferdinand


Dear Ferdinand,


thank you for contacting us.


Can you please try to add the "t" array in your request:

,"t":[]


Indeed, you request should be formatted as explained in the API: http://doc.myscript.com/MyScriptCloud/3.2.0/reference/index.html#api-Text_Websocket_Recognition-Start


Best regards,


Olivier

Dear Oliver,


thanks for the response. I've added

, "t":[]

 but the response is the same. Is there any clue to find out what could be wrong? Could the issue be on the sending data side, i.e. some kind of white-space characters or anything else?

Thanks for the help,

F

Dear Ferdinand,

can you please try to remove the following fields: "userId", "containerId", and "containerType".

Let us know if this works.

Best regards,

Olivier
Login or Signup to post a comment