Home › Forum › SofaPython3 › Getting Started › [SOLVED] runSofa -lSofaPython3 causing sofa to close
Tagged: SOFA_2106, SofaPython3, VS2019, Windows_10
- This topic has 16 replies, 3 voices, and was last updated 3 years, 1 month ago by Julien D..
-
AuthorPosts
-
4 October 2021 at 06:31 #20488baniBlocked
I am facing the following error when I am trying to run sofa using runSofa -lSofaPython3:
Unhandled exception at 0x00007FFDB013286E (ucrtbase.dll) in runSofa.exe: Fatal program exit requested.
Kindly help me how to fix it so I can use python for Sofa4 October 2021 at 08:44 #20493HugoKeymasterHi @vanisri
You confirm that you are using v21.06 with VS19 and Win10, correct ?
Are you using the sources or the binaries?Could you please detail the full command line ?
Did you make sure that:
– you specified the write path to the libSofaPython3 like:
./bin/runSofa plugins/SofaPython3/lib/libSofaPython3.so
(for Linux)
– you defined bothSOFA_ROOT
and added the SOFA python bindings inPYTHONPATH
as specified here.Best
Hugo
4 October 2021 at 17:38 #20495baniBlockedDear @Hugo ,
Yes, I am using v21.06 with VS 19 and Win 10. I have installed SOFA using the binaries. I am unable to runSofa itself now while previous to adding the Sofa python3 plugin it was. I get warnings that say
[WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::cleanup() has never been called, see sofa/helper/init.h)
[WARNING] [SofaSimulationCommon] the library has not been cleaned up (sofa::simulation::common::cleanup() has never been called, see sofa/helper/init.h)
[WARNING] [SofaSimulationCore] the library has not been cleaned up (sofa::simulation::core::cleanup() has never been called, see sofa/helper/init.h)
[WARNING] [SofaCore] the library has not been cleaned up (sofa::core::cleanup() has never been called, see sofa/helper/init.h)I have created system variables as mentioned on the website. The software stopped working when I run runSofa -lSofaPython3.
7 October 2021 at 11:06 #20550HugoKeymasterHi @vanisri
It looks like a problem of environment to me though.
Could you please check their values in the Windows “Environment Variables” and share them with us?Best wishes,
Hugo
8 October 2021 at 07:49 #20558baniBlockedDear @Hugo,
I have set the environment variable as in the attached images, kindly let me know if any thing else is also supposed to be done.
https://drive.google.com/file/d/1C7xMp9GeScwelPe4MyZhtBdssOZhVWKU/view?usp=sharing
8 October 2021 at 08:20 #20563HugoKeymasterHi @vanisri
You should keep only ONE path to SOFA to make it safer (actually to make sure Win finds the SOFA you intend it to find).
Moreover, SOFA_ROOT is not a path to SOFA-v21.06/bin but only to SOFA-v21.06/.
Finally, the PYTHONPATH seems to be missing. (path to the sites packages of SofaPython3).
Best
Hugo
8 October 2021 at 18:31 #20573baniBlockedDear @Hugo,
Thank you I have made the changes to add python path, make the path to sofa/v21.06 instead of sofa/v21.06/bin, and remove all other sofa except this one from the path. However, the problem still persists. I am getting the same warnings after which sofa shuts down.
the warnings are-
[WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::cleanup() has never been called, see sofa/helper/init.h)
[WARNING] [SofaSimulationCommon] the library has not been cleaned up (sofa::simulation::common::cleanup() has never been called, see sofa/helper/init.h)
[WARNING] [SofaSimulationCore] the library has not been cleaned up (sofa::simulation::core::cleanup() has never been called, see sofa/helper/init.h)
[WARNING] [SofaCore] the library has not been cleaned up (sofa::core::cleanup() has never been called, see sofa/helper/init.h)10 October 2021 at 14:22 #20574HugoKeymasterHi @vanisri
Aa stated in my previous message: the PYTHONPATH seems to be missing (path to the sites packages of SofaPython3).
export PYTHONPATH=/path/to/SofaPython3/lib/python3/site-packages:$PYTHONPATH
Best
Hugo
11 October 2021 at 10:09 #20579baniBlockedDear @Hugo,
Based on my understanding I had added pythonpath in my windows 10 computer as in the below picture, please correct me if something else was to be done,
11 October 2021 at 10:15 #20582HugoKeymasterHi @vanisri
As stated in the documentation of SofaPython3, binaries were compiled with python3.7.
You should therefore run the 3.7 version and not the 3.9 version as you have.
Best wishes,
Hugo
13 October 2021 at 02:09 #2059913 October 2021 at 15:39 #20604baniBlockedDear @Hugo,
I have now been trying to run the first steps tutorials in Sofarobotics plugin, I have installed the stlib plugin, but when I run it I get an error that says ModuleNotFound: No module named ‘stlib’ , kindly let me know how to go about this.14 October 2021 at 20:34 #20617HugoKeymasterHi @vanisri
The STLIB plugin is not supported by us, and it had some compatibility issues with SofaPython3. But devs are working on it and a new minor release should soon come out with the updated STLIB dll.
Which version of SOFA are you using? v21.06.00 or v21.06.01 ?
Best
Hugo
15 October 2021 at 04:39 #2062020 October 2021 at 15:36 #20670HugoKeymasterHi @vanisri
If you have the motivation you can migrate to v21.06.01 and see if this helps.
But when having theimport stlib
in a python script, it means that the scene is looking for python2 codes.
For python3, the import should be changed toimport stlib3
Best
Hugo
22 October 2021 at 19:38 #20692baniBlockedHi @Hugo,
I tried import stlib3 with version, 21.06.01, I am getting the same error, No module named ‘stlib3’, Is there something wrong that I am doing24 October 2021 at 22:15 #20696Julien D.BlockedHello, I am NOT using Sofa 21 but Sofa 20.12 on Windows 10, so I dont have the same exact config as you, but perhaps my answer could help you to solve your issue.
After I’ve compiled IN-TREE the sofaPython3 plugin, when I executed -runSofa and went to the pluginManager to add the SofaPython3 plugin, I add an error loading the plugin: sofa was complaining that it did not find the folder sofa/build/bin/python3 .
Actually, this folder did exist but was automatically placed in sofa/build/python3.
So, to solve this issue, I just copied this folder to sofa/build/bin. And now, sofaPython3 is working perfectly, and I’ve been able to write my own scene already 🙂I hope my experience had helped you.
Have a good sunday,
Best wishes,
Julien
-
AuthorPosts
- You must be logged in to reply to this topic.