Trouble Running AddPathSpring.py Script

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Colin Holtkamp
Posts: 10
Joined: Tue Jan 22, 2019 10:44 am

Trouble Running AddPathSpring.py Script

Post by Colin Holtkamp » Mon Jun 17, 2019 10:35 am

Hi, I am new to open sim and currently running through the intermediate tutorial "Simulation-Based Design to Reduce Metabolic Cost". I am Trying to run the pre-downloaded script "AddPatchSpring.py" In order to create a new model with a biarticular spring. I am not very familiar with scripting. I am getting the following error:

java.io.IOException: Failed to connect Socket 'parent_frame' of type PhysicalFrame (details: Component 'walk_subject01_ankle_spring_path_spring' could not find '/forceset/BiarticularSpringDamper/bodyset/femur_r' of type PhysicalFrame. Make sure a component exists at this path and that it is of the correct type.
Thrown at Component.h:764 in getComponent().).
In Object 'med_gas_r-P1' of type PathPoint.
Thrown at Component.cpp:312 in finalizeConnections().
at org.opensim.modeling.opensimSimulationJNI.Model_initSystem(Native Method)
at org.opensim.modeling.Model.initSystem(Model.java:848)
at org.opensim.view.pub.OpenSimDB.addModel(OpenSimDB.java:146)
at org.opensim.view.pub.OpenSimDB.addModel(OpenSimDB.java:141)
[catch] at org.opensim.console.gui.loadModel(gui.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
at org.python.core.PyObject.__call__(PyObject.java:387)
at org.python.core.PyObject.__call__(PyObject.java:391)
at org.python.pycode._pyx16.f$0(/Users/colinholtkamp/Documents/OpenSim/4.0/Models/Gait10dof18musc/Scripts/addPathSpring.py:48)
at org.python.pycode._pyx16.call_function(/Users/colinholtkamp/Documents/OpenSim/4.0/Models/Gait10dof18musc/Scripts/addPathSpring.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1261)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:522)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)
at org.opensim.console.JConsole.executeFile(JConsole.java:167)
at org.opensim.console.ScriptsRunBrowseAction.performAction(ScriptsRunBrowseAction.java:46)
at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:130)
at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:127)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
at java.awt.MenuItem.processEvent(MenuItem.java:628)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

As I stated earlier, I am new to scripting and I really don't know how to verify if the "Component exists at the given path." Could anyone tell me how to resolve this issue? Thanks

Colin Holtkamp

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Trouble Running AddPathSpring.py Script

Post by jimmy d » Mon Jun 17, 2019 11:56 am

Hi, Colin-

This is an existing bug that we hope to fix in the next release. The issue can be found here.

Unfortunately, there isn't much that can be done to work around the issue, I will update this thread when it is fixed and the next release is out.

Thanks,
-James

User avatar
Colin Holtkamp
Posts: 10
Joined: Tue Jan 22, 2019 10:44 am

Re: Trouble Running AddPathSpring.py Script

Post by Colin Holtkamp » Mon Jun 17, 2019 6:25 pm

Ok Great! Thanks James!

Colin Holtkamp

POST REPLY