Home › Forum › SOFA › Getting Started › Python scene errors
Tagged: .py, Other, SOFA_2012, Windows_10
- This topic has 19 replies, 4 voices, and was last updated 3 years, 1 month ago by Steph.
-
AuthorPosts
-
12 April 2021 at 20:56 #19146StephBlocked
Hello everybody!
I am not well versed in setting up programs and stuff so I apologize in advance for the noob-questions that follow. Nevertheless I’d greatly appreciate your help! In the following I try to describe my proceedings and the issued errors in detail. Python 3.7 is installed on my computer that runs Windows 10.
I installed sofa v20.12.01 from binaries (https://www.sofa-framework.org/download/) and followed the great “SOFA Training Session 2020: Introduction to SOFA” on youtube with which I managed to build my first scenes with xml.
Since I am interested in using the SoftRobot plugin and python scripts I then did the following:
Runsofa > edit > plugin manager > add
And then I added:
– C:\Users\vogts\SOFA\v20.12.01\plugins\SofaPython3\bin SofaPython3.dll
– C:\Users\vogts\SOFA\v20.12.01\plugins\SoftRobots\bin SoftRobots.dll
– C:\Users\vogts\SOFA\v20.12.01\plugins\STLIB\bin STLIB.dll (I am actually not sure if this step was necessary, I see in the plugin manager that STLIB is located at a different path (\v20.12.01\bin) than the other two so STLIB might have already been included (?)I then downloaded the softrobot plugin from https://project.inria.fr/softrobot/install-get-started-2/download/ and copied ONLY the folder C:\Users\vogts \Downloads\SOFA_v20.12.02_Defrost_Win64\SOFA_v20.12.00_Win64\plugins\SoftRobots\docs into C:\Users\vogts\SOFA\v20.12.01\plugins\SoftRobots, since I couldn’t find included tutorials with the original download. Afterwards I deleted all files of this second download.
Error A) Now when I try to open “firststeps-tuto.pyscn” from sofa > open in the FirstSteps tutorial that I added into above-mentioned folder structure, I get the following error message:
Error B) I also tried writing a Python file (myscript.py located where the normal xml examples are located) from scratch and opening that from within sofa (same as the one presented in the SOFA training sessions, see screenshot). The exact same error appears also with a myscript.pyscn file extension.
Could anyone help me with these errors?
Again I apologize for my lack of experience with setting up these things.Best regards
Stephi15 April 2021 at 18:49 #19185HugoKeymasterHi @steph,
First of all, welcome on the SOFA forum! Here, no need to apologize for noob-looking question, we are here for this! Second, it is really great to read that the YouTube tutorials are being helpful! Note that more advanced training session can be arranged for later 😉
NOTE: I can not access your errors / files.
Downloading SOFA binaries from https://www.sofa-framework.org/download/ or from https://project.inria.fr/softrobot/install-get-started-2/download/ is actually equivalent!
After adding in the PluginManager (as you described) the plugins (SoftRobots, STLIB) you will be able to run the scenes.
Now, about your problem with Python scenes, it is due to the fact the v20.12 release is the first version of SOFA including the SofaPython3 plugin. All the scenes in SoftRobots were not yet updated to work with python3. Two solutions:
– you use the SofaPython plugin instead (corresponding to SofaPython2.7) with SoftRobots
– or (more modern and useful for a close future) I can help you to update one python scene of interest for you to work with SofaPython3!Looking forward to hearing from you,
Hugo
15 April 2021 at 19:48 #19186StephBlockedHi Hugo, nice to hear from you in writing as well after watching you for some hours on youtube 😀
Thanks for the notification that the screenshots are not viewable, I will paste the error code in the following.
I tried to use the (Python2.7) SofaPython plugin with the following script of the SoftRobots tutorials
from stlib.scene import MainHeader, ContactHeader from stlib.visuals import ShowGrid from stlib.physics.rigid import Floor from stlib.physics.rigid import Cube def createScene(rootNode): """This is my first scene""" MainHeader(rootNode, gravity=[0.0,-981.0,0.0]) ContactHeader(rootNode, alarmDistance=15, contactDistance=10) Floor(rootNode, translation=[0.0,-160.0,0.0], isAStaticObject=True) Cube(rootNode, translation=[0.0,0.0,0.0], uniformScale=20.0) return rootNode
however I get an STLIB(.scene) error. Do I need to manually download/add STLIB into some directory? I read in some other forum posts about out-of-tree and cmake in connection with STLIB but am not sure if I need to do that and if so how. I assumed it came with the latest SOFA version since it’s listed in the plugin manager.
[INFO] [runSofa] PluginRepository paths = C:/Users/vogts/SOFA/v20.12.01/plugins;C:/Users/vogts/SOFA/v20.12.01/bin;C:/Users/vogts/SOFA/v20.12.01/bin [INFO] [runSofa] DataRepository paths = C:/Users/vogts/SOFA/v20.12.01/share/sofa;C:/Users/vogts/SOFA/v20.12.01/share/sofa/examples;C:/Users/vogts/SOFA/v20.12.01/share/sofa;C:/Users/vogts/SOFA/v20.12.01/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/vogts/SOFA/v20.12.01/share/sofa/gui/runSofa;C:/Users/vogts/SOFA/v20.12.01/share/sofa/gui/qt [INFO] [runSofa] Loading automatically plugin list in C:/Users/vogts/SOFA/v20.12.01/bin/plugin_list.conf [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGraphComponent.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaBoundaryCondition.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralAnimationLoop.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralLinearSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaTopologyMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaUserInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaConstraint.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaExporter.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaSparseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaPreconditioner.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaHaptics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaValidation.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaDenseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaNonUniformFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaOpenglVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscExtra.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscForceField.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaSphFluid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/STLIB.dll [INFO] [SofaPython] Added 'C:/Users/vogts/SOFA/v20.12.01/plugins/SofaPython/lib/python2.7/site-packages' to sys.path [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/plugins/SofaPython/bin/SofaPython.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/plugins/SoftRobots/bin/SoftRobots.dll [INFO] [SofaPython] Added 'C:/Users/vogts/SOFA/v20.12.01/plugins/SoftRobots/lib/python2.7/site-packages' to sys.path Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing. The constructor with a QGLFormat is deprecated, use the regular contructor instead. [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". [ERROR] [PythonScript] ImportError: No module named stlib.scene File "firststeps-tuto.pyscn", line 1, in <module> from stlib.scene import MainHeader, ContactHeader [ERROR] [SofaPython] Script (file:firststeps-tuto) import error [ERROR] [SofaPython] scene script load error. [WARNING] [RealGUI] Failed to load C:/Users/vogts/SOFA/v20.12.01/share/sofa/examples/Stephi_tryout/firststeps-tuto.pyscn
Nevertheless, the minimal python script example you presented in the youtube tutorial:
import Sofa def createScene(node): node.gravity="0 0 0" node.name = "root" childNode = node.createChild("Particle") childNode.createObject('EulerImplicitSolver') childNode.createObject('CGLinearSolver',iterations="200",tolerance="1e-09") childNode.createObject('MechanicalObject', template="Rigid3d", name="myParticle",position="0 0 0 0 0 0 1", showObject="1") childNode.createObject('UniformMass',totalMass="1") childNode.createObject('ConstantForceField', name ="CFF", totalForce="1 0 0 0 0 0")
works now (except a “scene radius must be positive – ignoring value” message)!
I assume we have to get above to run before potentially moving to Python3?
Thanks for your reply/help and best regards
Stephi23 April 2021 at 17:02 #19287StephBlockedIs anyone able to help me with this issue?
Would be very much appreciated!
Best
Stephi4 May 2021 at 19:56 #1935616 May 2021 at 22:18 #19461ToriBlockedHello everybody!
I am actually gnawing at the exactly same problem as @Steph and would also appreciate if we could solve that issue 😉
Thank you all very much in advance!
Best regards!
19 May 2021 at 10:35 #19484younesssssBlockedHi @Steph & @Tori ,
did you add the splib and stlib folder to your path?
/PATH_TO_STLIB_FOLDER/python
if your are usingpython 2.7
and/PATH_TO_STLIB/python3/src
if your are usingpython3
.However, some scenes in the tutorial do not work with python3.
It needs a few modifications, like swtichcreatsChild
withaddChild
and
from stlib3.scene.Scene import Scene
instead offrom stlib.scene import MainHeader, ContactHeader
For binairies add
/PATH_TO_INSTALL/lib/python3/site-packages/
or/PATH_TO_INSTALL/lib/python2/site-packages/
, and check that these folders are actually on your computer.19 May 2021 at 16:30 #19489StephBlockedHi @younesssss, thanks for your reply.
So I would like to use python 2.7 since to my understanding many of the softrobotic tutorials are still using python 2.7.
I actually hadn’t manually added the stlib folder to my path yet.
However, in my STLIB folder from the binaries I do have
...\SOFA_v20.12.02_Win64\plugins\STLIB\python
but not the python3/src you mentioned, and on the opposite I have...\SOFA_v20.12.02_Win64\plugins\STLIB\lib\python3\site-packages
, and not the python2 site-packages –> so there seems to be a mismatch here (unless I am looking in the wrong folders).
How would you proceed?Thanks for your help
Steph20 May 2021 at 20:56 #19499younesssssBlockedThen add
Path_to_\SOFA_v20.12.02_Win64\plugins\STLIB\python
in your path since you want to use python225 May 2021 at 10:20 #19541StephBlockedHi @younesssss
Thanks for your feedback, I implemented it.
I can open and run SofaPython examples without errors, however STLIB is still causing trouble.
I tried opening the CableConstraint.pyscn example in the\SOFA_v20.12.02_Win64\plugins\SoftRobots\docs\examples\component\constraint\CableConstraint
folder and got the following error:[INFO] [runSofa] PluginRepository paths = C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin [INFO] [runSofa] DataRepository paths = C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/examples;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/gui/runSofa;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/gui/qt [INFO] [runSofa] Loading automatically plugin list in C:\Users\vogts\Downloads\SOFA_v20.12.02_Win64\bin/plugin_list.conf [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGraphComponent.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaBoundaryCondition.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralAnimationLoop.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralLinearSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaTopologyMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaUserInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaConstraint.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaExporter.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaSparseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaPreconditioner.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaHaptics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaValidation.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaDenseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaNonUniformFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaOpenglVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscExtra.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscForceField.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaSphFluid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/STLIB/bin/STLIB.dll [INFO] [SofaPython] Added 'C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/SofaPython/lib/python2.7/site-packages' to sys.path [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/SofaPython/bin/SofaPython.dll Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing. The constructor with a QGLFormat is deprecated, use the regular contructor instead. [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". [ERROR] [PythonScript] ImportError: No module named stlib.scene File "CableConstraint.pyscn", line 7, in <module> from stlib.scene import Scene [ERROR] [SofaPython] Script (file:CableConstraint) import error [ERROR] [SofaPython] scene script load error. [WARNING] [RealGUI] Failed to load C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/SoftRobots/docs/examples/component/constraint/CableConstraint/CableConstraint.pyscn
Any further suggestions on how to resolve this?
Thanks!
Steph25 May 2021 at 12:33 #19542younesssssBlocked25 May 2021 at 17:19 #19564StephBlockedDear @younesssss
Verzeichnis von C:\Users\vogts\Downloads\SOFA_v20.12.02_Win64\plugins\STLIB\python\stlib 21.05.2021 15:36 <DIR> . 21.05.2021 15:36 <DIR> .. 30.03.2021 17:27 <DIR> algorithms 30.03.2021 17:27 <DIR> animation 30.03.2021 17:27 <DIR> communication 30.03.2021 17:27 <DIR> components 30.03.2021 17:27 <DIR> debug 30.03.2021 17:27 <DIR> loader 30.03.2021 17:27 <DIR> numerics 30.03.2021 17:27 <DIR> physics 21.05.2021 15:36 <DIR> scene 30.03.2021 17:27 <DIR> solver 30.03.2021 17:27 <DIR> tools 30.03.2021 17:27 <DIR> units 30.03.2021 17:27 <DIR> visuals 30.03.2021 16:04 307 __init__.py 21.05.2021 15:36 512 __init__.pyc
Best
Steph2 June 2021 at 14:06 #19626younesssssBlockedHi @Steph
I think the easiest way to do this is to clone STLIB from Github and add it to your path.
This way we are sure you have all the files.Sorry for my late answer.
7 June 2021 at 11:21 #19660ToriBlockedHi @younesssss!
As I am working on the exactly same issue as @Steph, I allow myself to answer;)
I cloned the STLIB from GitHub and added it to my path- however it does not seem to solve that issue.
I still get the following errors:
[ERROR] [PythonScript] ImportError: No module named stlib.scene
File “step0.pyscn”, line 2, in <module>
from stlib.scene import MainHeader, ContactHeader[ERROR] [SofaPython] Script (file:step0) import error
[ERROR] [SofaPython] scene script load error.
[WARNING] [RealGUI] Failed to load /home/vicky/SOFAv20.12.01/bin/step0.pyscnBest regards,
Tori
16 June 2021 at 22:48 #19739HugoKeymasterI would like to inform you that we are currently working hard on improving the installation of SOFA/SoftRobots/STLIB and providing better step-by-step documentation. This should be ready for the next release (end of June : v21.06).
Sorry for the inconvenience, we know your time is precious, especially during internships!
Best wishes,
Hugo
29 June 2021 at 13:56 #19889ToriBlockedHi @Hugo!
Thank you very much for letting us know and working on it!
Looking forward to seeing the results 😉Best wishes,
Tori
30 July 2021 at 11:57 #20104HugoKeymasterThe new release v21.06 is out for a month now (sorry for the delay, I was away these last weeks). The binaries include the latest version of SOFA, STLIB and the SoftRobots plugin!
Your feedback would be most appreciated.
Best wishes,Hugo
3 August 2021 at 10:53 #20113ToriBlockedHi @Hugo!
Perfect thank you very much for letting us know, much appreciated!
I will give it a try this week and keep you updated!Best regards,
Tori
7 September 2021 at 14:48 #20322HugoKeymaster23 September 2021 at 14:15 #20419StephBlockedHi Hugo
Unfortunately I can’t give you any updates from my side since I moved on to other challenges and haven’t tried out the newest version yet. If I do I will definitely let you know.
Thanks for your support and best regards
Steph -
AuthorPosts
- You must be logged in to reply to this topic.