Hello all,
New user and new install. Windows 10, Matlab R2017a. I have OpenSim/bin in my environment path and the OpenSim models and code folder in my matlab path.
I get the correct output when I ask for the version and the code works when I run model=org.opensim.modeling.Model()
but if I try to run any code that tries to open .osim files, I get a Java exception error similar to below. This is true for any script for any model that I have including tugofwar.
What would be causing this and how do I fix it? Does it not recognize the name or is it not looking in the right place?
Additionally,
model.initSystem(); which crashes matlab.
Not sure if that is helpful.
Thanks!
Joe
Error using das3driver>das3driver_OpeningFcn (line 141)
Java exception occurred:
java.io.IOException: Object: Cannot open file ../OpenSim_model/das3.osim. It
may not exist or you do not have permission to read it.
Thrown at object.cpp:105 in Object().
at org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_1(Native
Method)
at org.opensim.modeling.Model.<init>(Model.java:783)
Newbie issue - Cannot open file... It may not exist or you do not have permission to read it
- Joseph Kopke
- Posts: 2
- Joined: Wed Nov 20, 2019 1:04 pm
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Newbie issue - Cannot open file... It may not exist or you do not have permission to read it
Hello,
The fact that the error message shows a relative path for the model file (starting with '../') suggests that your assumption about working directory is incorrect, please use a full (absolute) path instead or set working directory for Matlab accordingly.
Please let us know how that goes,
-Ayman
The fact that the error message shows a relative path for the model file (starting with '../') suggests that your assumption about working directory is incorrect, please use a full (absolute) path instead or set working directory for Matlab accordingly.
Please let us know how that goes,
-Ayman
- Joseph Kopke
- Posts: 2
- Joined: Wed Nov 20, 2019 1:04 pm
Re: Newbie issue - Cannot open file... It may not exist or you do not have permission to read it
I did not realize that the osim files had to be in the current folder / working directory as opposed to just in the Matlab path. It is working now if I work out of the folder with the osim files.
Thanks!
Thanks!