Closed katya-stanzy closed 1 month ago
Hi @katya-stanzy, I just tested your files in IPython console (.py
rather than .ipynb
) and it worked. Perhaps something is wrong with the way you use opensim Logger and Jupyter Notebook. These two lines would be sufficient if you want to keep the logs in separate files. Could you try commenting out the other lines related to the Logger?
osim.Logger.removeFileSink()
osim.Logger.addFileSink(PATH_TO_LOG_FILE)
Also, just a couple of points:
calcn_r
and calcn_l
bodies.Hope this helps.
Hi, mrrezaie - yes, you are absolutely right. The log script was the issue -- sorry for ever doubting OpenSim! Also thank you for pointing out the large errors in SO solutions for that data, I found a silly bug in my script for feet determination almost immediately.
Outstanding work @mrrezaie 👏 I will leave this issue open until we can scope the logger issue, and if it is specific to the fileSink calls in ipynb
There's no need to subclass across the interface between c++ and python when we provide methods specifically to add/remove FileSink that work as demonstrated by @mrrezaie
This question is related to this post on the OpenSim forum.
Hello,
I am using OpenSim with Python. Previousely, I was able to run several Static Optimization analyses using the Analyze tool consecutively. It is no longer possible in the new OpenSim 4.5 Python package. When moving on to the next trial, the Kernel crashes with the following error:
"SWIG director method error. Error detected when calling 'LogSink.sinkImpl''
Is it a known problem? Does a fix exist?
Repeat_SO_Failure_Python.zip