Dear Osprey team,
When using the Osprey GUI to create a job file on a Windows system, there is a bug that causes the GUI to crash with this error
Error using jsondecode
JSON syntax error at line 26, column 15 (character 553): escape character ‘\U’ is not valid.
Error in OspreyJob (line 225)
jobStruct = jsondecode(str);
Error in CreateOspreyJob_app/CREATEJOBButtonPushed (line 471)
MRSCont = OspreyJob(jobm,1);
Error in appdesigner.internal.service.AppManagementService/executeCallback (line 138)
Error in matlab.apps.AppBase>@(source,event)executeCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 63)
newCallback = @(source, event)executeCallback(appdesigner.internal.service.AppManagementService.instance(), …
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback
Error while evaluating DestroyedObject PrivateButtonPushedFcn.
It seems the error arises due to the fact that the file seperator on windows systems is ‘\’ which in json is an “escape” character, so to allow the ‘\’ to work as a file seperator you need to ‘escape’ before it with a ‘\’ so use ‘\\’ instead.
The partner of one of my students (Billy Hayes) made a simple one line edit to the OspreyJob.m file by adding
str = replace(str, ‘\’, ‘\\’);
just after line 220
str = char(raw’);
This may be useful for other 'beginer" sites that are using Windows and want to start with the GUI version of things.
(Note, even here in this forum when writing this post I had to escape the \ in the post editor to allow it to show in the HTML formatted post.)