Page 1 of 1

Required condition 'saveOK' was not met

Posted: Wed Feb 24, 2021 1:50 pm
by pablo_delgado
I have been trying to use the Static Optimization tool, however, when it is about 99%, I get the error saying "Required condition 'saveOK' was not met"

java.lang.RuntimeException: SimTK Exception thrown at Xml.cpp:115:
Error detected by Simbody method Xml::writeToFile(): Failed to write to the Xml file 'C:\Users\Pablo\OneDrive - Wichita State University\NSF\OpenSim Models and Data\Stanford Model for Upper Extremity\MoBL_ARMS_tutorial_33\ModelFiles\Project data\Subject Thisath\Static Optimization/MoBL_ARMS_Upper_Limb_Model_OpenSim-scaled_StaticOptimization_controls.xml' with error ' (line=1, col=1)'.
(Required condition 'saveOK' was not met.)

at org.opensim.modeling.opensimActuatorsAnalysesToolsJNI.AnalyzeTool_run__SWIG_0(Native Method)
at org.opensim.modeling.AnalyzeTool.run(AnalyzeTool.java:154)
at org.opensim.tracking.AnalyzeToolModel$AnalyzeToolWorker.construct(AnalyzeToolModel.java:139)
at org.opensim.swingui.SwingWorker$2.run(SwingWorker.java:130)
[catch] at java.lang.Thread.run(Thread.java:748)

Any suggestion?

Re: Required condition 'saveOK' was not met

Posted: Wed Feb 24, 2021 5:39 pm
by tkuchida
It looks like OpenSim was unable to save the file ("Failed to write to the Xml file"). This error is typically encountered when trying to write to a directory to which OpenSim does not have write access. However, in this case, I think you are exceeding the Windows character limit for the path + filename. Try writing to a path with fewer characters (e.g., a folder on your Desktop).

Re: Required condition 'saveOK' was not met

Posted: Thu Feb 25, 2021 10:38 am
by pablo_delgado
tkuchida wrote:
Wed Feb 24, 2021 5:39 pm
It looks like OpenSim was unable to save the file ("Failed to write to the Xml file"). This error is typically encountered when trying to write to a directory to which OpenSim does not have write access. However, in this case, I think you are exceeding the Windows character limit for the path + filename. Try writing to a path with fewer characters (e.g., a folder on your Desktop).
Thank you very much!