Forum Replies Created
-
AuthorPosts
-
SerkanErgunAAUBlocked
Yes of course. I thought I close it myself already, though.
Thanks for your help.
All the best,
SerkanSerkanErgunAAUBlockedDear all,
I changed the way of installing python 3.7 from Microsoft Store to direct download from the Python website.
Python works as expected, and indeed SOFA loads the plugin – I was able to execute the liver.py demo.
Interestingly though I am seeing the following warning:[INFO] [SofaPython3] Initializing with python version 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] [INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files. [INFO] [SofaPython3] Intializing python --------------------------------------- Checking SOFA_ROOT and SOFAPYTHON3_ROOT Using environment variable SOFA_ROOT: C:\Users\Serkan Ergun\Documents\SOFA\v21.06.02 Using environment variable SOFAPYTHON3_ROOT: C:\Users\Serkan Ergun\Documents\SOFA\v21.06.02\plugins\SofaPython3 Warning: cannot find SofaPython3.dll at path: C:\Users\Serkan Ergun\Documents\SOFA\v21.06.02\plugins\SofaPython3\bin This path will NOT be added to the DLL search path. Loading SofaPython3 python modules will likely fail.
I checked, and this dll file is definetly there. I am using the binary “zip” Version of SOFA.
EDIT:
I also added a SOFAPYTHON3_ROOT environment varibale to remove another warning. I did not see such warnings in SOFA v20.12FURTHER EDIT:
I was able to execute runSofa without any warnings now. I copy pasted the dll from the bin folder of SOFA bin directory to the plugin directorySerkanErgunAAUBlockedThanks, @akthetimes.
So I will look into resloving this issue.
SerkanErgunAAUBlocked[INFO] [PluginManager] Loaded plugin: C:/Users/Serkan Ergun/Documents/SOFA/v21.06.02/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/Serkan Ergun/Documents/SOFA/v21.06.02/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/Serkan Ergun/Documents/SOFA/v21.06.02/bin/SofaSphFluid.dll [ERROR] [PluginManager] Plugin loading failed (C:/Users/Serkan Ergun/Documents/SOFA/v21.06.02/bin/SofaPython3.dll): Zugriff verweigert [INFO] [PluginManager] Loaded plugin: C:/Users/Serkan Ergun/Documents/SOFA/v21.06.02/bin/STLIB.dll [INFO] [PluginManager] Loaded plugin: C:/Users/Serkan Ergun/Documents/SOFA/v21.06.02/bin/SoftRobots.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.
I installed via Microsoft Store. per default it is installed in the protected WindowsApps folder. Using Explorer, one can grant full acces to that folder using Admin rights. If this would not work, I should not be able to reach the Python folder. The German error message means that the error arises either from System or from Python and not from SOFA.
I am further looking into this at the moment. I just wanted to post a topic to see, if somebody else is also facing this issue.21 July 2021 at 08:02 in reply to: [SOLVED] Accessing deformations, force states, etc using Python #20044SerkanErgunAAUBlockedHey Jean-Nicolas,
thank you for the example given. it helps me a lot. I will have a further look into this matter. I will mark this topic as resolved. Thank you!
All the best,
Serkan13 July 2021 at 15:04 in reply to: [SOLVED] Accessing deformations, force states, etc using Python #20020SerkanErgunAAUBlockedDear Jean-Nicolas,
thanks for your response.
I would be looking into the deformation/displacment of the mesh of a specific deformable object (in a scene with multiple objects). In addition also local force values would be interesting but this is secondary at the moment.
Edit:
I am using the ‘TetrahedronFEMForceField’All the best,
SerkanSerkanErgunAAUBlockedHi @sergiopm23 and @ Hugo,
I am also interested in this topic. The examples provided are unfortunately very basic.
I am looking into handling objects (such as setting the pose of a mechanical object -> to have an object rotate alongside a fixed axis) at each animation stepConsider the following as a minimal example, it misses plugins and definition of angle, n,…
class Controller(Sofa.Core.Controller) def __init__(self, *args, **kwargs): Sofa.Core.Controller.__init__(self, *args, *kwargs) def onAnimateBeginEvent(self, event): # called at each begin of animation step rotation=[0,angle[n],0] pass def createScene(rootNode): rootNode.gravity=[0,-9810,0] rootNode.dt=0.05 robot=rootNode.addOject("robot") baseJoint=robot.addObject("baseJoint") baseJoint=addObject("MechanicalObject",name="mstate",<strong>rotation</strong>) pythonController=robot.addObject(Controller(name="Controller", target=baseJoint))
I want the parameter rotation to be set via the controller for each animation step.
Edit, i think I now how to pass on data, but I am stuck on the right naming convention:
class Controller(Sofa.Core.Controller) def __init__(self, *args, **kwargs): Sofa.Core.Controller.__init__(self, *args, *kwargs) def onAnimateBeginEvent(self, event): # called at each begin of animation step rotation=[0,angle[n],0] ### self.engine.findData('rotation').value = rotation ### This is the way how it is done in SofaPython2 pass def createScene(rootNode): rootNode.gravity=[0,-9810,0] rootNode.dt=0.05 robot=rootNode.addOject("robot") baseJoint=robot.addObject("baseJoint") baseJoint=addObject("MechanicalObject",name="mstate",<strong>rotation</strong>) pythonController=robot.addObject(Controller(name="Controller", target=baseJoint)).
Furthermore I executed – emptyController.py
I do not get any feedback of key Events or mouse interactions during active simulation.
Do you experience the same issues?All the best,
Serkan25 May 2021 at 12:33 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19543SerkanErgunAAUBlockedHey,
Did you follow the instructions at SofaPython3 readTheDocs?
I have seen this error previously when I forgot to set PYTHONHOME as a system variable.
I hope this helps.
All the best,
Serkan
SerkanErgunAAUBlocked26 April 2021 at 07:19 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19310SerkanErgunAAUBlockedHi Guillaume,
thank you for all the investigations. As the real issue is clearly out of scope of the initial enquiry, I will mark this topic as solved. Thanks again. I will try to post some issues that I may find on the Github link provided.
Thank you very much,
Serkan
21 April 2021 at 08:35 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19237SerkanErgunAAUBlockedI downloaded the “zip” version now. STLIB apparently can be loaded now (the directoy contains a site-packages folder now)
Unfortunately I am presented with the following error
[ERROR] [SofaPython3::SceneLoader] AttributeError: module 'Sofa' has no attribute 'Prefab'
when loading the file from https://github.com/SofaDefrost/SoftRobots/blob/master/docs/tutorials/FirstSteps/details/sofapython3/step4.py3scnHere is (once more) the full cmd output:
Microsoft Windows [Version 10.0.18363.1500] (c) 2019 Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\seergun>cd SOFA C:\Users\seergun\SOFA>cd v20.12.02_V2 C:\Users\seergun\SOFA\v20.12.02_V2>cd bin C:\Users\seergun\SOFA\v20.12.02_V2\bin>runSofa [INFO] [runSofa] PluginRepository paths = C:/Users/seergun/SOFA/v20.12.02_V2/plugins;C:/Users/seergun/SOFA/v20.12.02_V2/bin;C:/Users/seergun/SOFA/v20.12.02_V2/bin [INFO] [runSofa] DataRepository paths = C:/Users/seergun/SOFA/v20.12.02_V2/share/sofa;C:/Users/seergun/SOFA/v20.12.02_V2/share/sofa/examples;C:/Users/seergun/SOFA/v20.12.02_V2/share/sofa;C:/Users/seergun/SOFA/v20.12.02_V2/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/seergun/SOFA/v20.12.02_V2/share/sofa/gui/runSofa;C:/Users/seergun/SOFA/v20.12.02_V2/share/sofa/gui/qt [INFO] [BaseGUI] Created directory: C:/Users/seergun/SOFA/v20.12.02_V2/config [INFO] [BaseGUI] Created directory: C:/Users/seergun/SOFA/v20.12.02_V2/screenshots [INFO] [runSofa] Loading automatically plugin list in C:\Users\seergun\SOFA\v20.12.02_V2\bin/plugin_list.conf [INFO] [SofaPython3] Initializing with python version 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 16:30:00) [MSC v.1900 64 bit (AMD64)] [INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files. [INFO] [SofaPython3] Intializing python [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2 Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'Sofa.livecoding' [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaPython3.dll [INFO] [SofaPython3] Added 'C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaPython3/lib/python3/site-packages' to sys.path [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaSimpleFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaSimpleFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaRigid.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaRigid [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaDeformable.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaDeformable [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaObjectInteraction.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaObjectInteraction [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMeshCollision.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMeshCollision [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaEngine.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaEngine [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaExplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaExplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaImplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaImplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaLoader.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaLoader [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralVisual.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralVisual [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGraphComponent.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGraphComponent [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralMeshCollision.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralMeshCollision [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaBoundaryCondition.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaBoundaryCondition [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralAnimationLoop.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralAnimationLoop [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralDeformable.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralDeformable [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralEngine.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralEngine [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralExplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralImplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralLinearSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralLinearSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralRigid.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralRigid [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralObjectInteraction.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralObjectInteraction [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralSimpleFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralSimpleFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralTopology.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralTopology [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaTopologyMapping.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaTopologyMapping [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaUserInteraction.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaUserInteraction [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaConstraint.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaConstraint [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaGeneralLoader.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaGeneralLoader [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaExporter.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaExporter [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaSparseSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaSparseSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaPreconditioner.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaPreconditioner [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaHaptics.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaHaptics [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaValidation.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaValidation [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaDenseSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaDenseSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaNonUniformFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaNonUniformFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaOpenglVisual.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaOpenglVisual [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscTopology.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscTopology [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscExtra.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscExtra [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscForceField.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscForceField [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscEngine.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscEngine [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscMapping.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscMapping [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/CImgPlugin.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/CImgPlugin [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaSphFluid.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaSphFluid [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SofaMiscCollision.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SofaMiscCollision [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/STLIB.dll [INFO] [SofaPython3] Added 'C:/Users/seergun/SOFA/v20.12.02_V2/plugins/STLIB/lib/python3/site-packages' to sys.path [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02_V2/bin/SoftRobots.dll [INFO] [SofaPython3] Added 'C:/Users/seergun/SOFA/v20.12.02_V2/plugins/SoftRobots/lib/python3/site-packages' to sys.path [INFO] [GUIManager] lastUsedGUI.ini not found; using default GUI. 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". __main__:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses [ERROR] [SofaPython3::SceneLoader] AttributeError: module 'Sofa' has no attribute 'Prefab' At: C:/Users/seergun/SOFA/v20.12.02_V2/plugins/STLIB/lib/python3/site-packages\stlib3\visuals\visualmodel.py(6): <module> <frozen importlib._bootstrap>(219): _call_with_frames_removed <frozen importlib._bootstrap_external>(728): exec_module <frozen importlib._bootstrap>(677): _load_unlocked <frozen importlib._bootstrap>(967): _find_and_load_unlocked <frozen importlib._bootstrap>(983): _find_and_load C:/Users/seergun/SOFA/v20.12.02_V2/plugins/STLIB/lib/python3/site-packages\stlib3\visuals\__init__.py(4): <module> <frozen importlib._bootstrap>(219): _call_with_frames_removed <frozen importlib._bootstrap_external>(728): exec_module <frozen importlib._bootstrap>(677): _load_unlocked <frozen importlib._bootstrap>(967): _find_and_load_unlocked <frozen importlib._bootstrap>(983): _find_and_load step4.py3scn(2): <module> <frozen importlib._bootstrap>(219): _call_with_frames_removed <frozen importlib._bootstrap_external>(728): exec_module <frozen importlib._bootstrap>(677): _load_unlocked <frozen importlib._bootstrap>(696): _load C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\Lib\imp.py(171): load_source C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\Lib\imp.py(234): load_module <string>(3): <module> [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". [WARNING] [RealGUI] Global Bounding Box seems very small; Your viewer settings (based on the bbox) are likely invalid, switching to default value of [-1,-1,-1,1,1,1].This is caused by using component which does not implement properly the updateBBox function.You can remove this warning by manually forcing a value in the parameter bbox="minX minY minZ"
20 April 2021 at 16:41 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19234SerkanErgunAAUBlockedpardon me, I gave you the wrong link to the file I tested:
This is the file I used for testing:
https://github.com/SofaDefrost/SoftRobots/blob/master/docs/tutorials/FirstSteps/details/sofapython3/step4.py3scnPer default, there is no site-packages folder included in this directory:
C:/Users/seergun/SOFA/v20.12.02/plugins/STLIB/lib/python3
20 April 2021 at 16:15 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19232SerkanErgunAAUBlockedSo, just to fully understand the issue:
I do the following:
runSofa -lSofaPython3 -lSTLIB
usingimport stlib3
For instance I open the following file in SOFA: https://github.com/SofaDefrost/SoftRobots/blob/master/docs/tutorials/FirstSteps/details/step4.pyscn
C:\Users\seergun\SOFA\v20.12.02\bin>runSofa -lSofaPython3 -lSTLIB [INFO] [runSofa] PluginRepository paths = C:/Users/seergun/SOFA/v20.12.02/plugins;C:/Users/seergun/SOFA/v20.12.02/bin;C:/Users/seergun/SOFA/v20.12.02/bin [INFO] [runSofa] DataRepository paths = C:/Users/seergun/SOFA/v20.12.02/share/sofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/examples;C:/Users/seergun/SOFA/v20.12.02/share/sofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/seergun/SOFA/v20.12.02/share/sofa/gui/runSofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/gui/qt [INFO] [SofaPython3] Initializing with python version 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 16:30:00) [MSC v.1900 64 bit (AMD64)] [INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files. [INFO] [SofaPython3] Intializing python [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02 Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'Sofa.livecoding' [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaPython3.dll [INFO] [SofaPython3] Added 'C:/Users/seergun/SOFA/v20.12.02/plugins/SofaPython3/lib/python3/site-packages' to sys.path [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/STLIB.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/STLIB [INFO] [runSofa] Loading automatically plugin list in C:\Users\seergun\SOFA\v20.12.02\bin/plugin_list.conf [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSimpleFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaSimpleFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaRigid.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaRigid [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaDeformable.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaDeformable [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaObjectInteraction.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaObjectInteraction [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMeshCollision.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMeshCollision [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaEngine.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaEngine [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaExplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaExplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaImplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaImplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaLoader.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaLoader [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralVisual.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralVisual [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGraphComponent.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGraphComponent [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralMeshCollision.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralMeshCollision [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaBoundaryCondition.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaBoundaryCondition [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralAnimationLoop.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralAnimationLoop [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralDeformable.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralDeformable [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralEngine.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralEngine [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralExplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralImplicitOdeSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralLinearSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralLinearSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralRigid.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralRigid [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralObjectInteraction.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralObjectInteraction [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralSimpleFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralSimpleFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralTopology.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralTopology [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaTopologyMapping.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaTopologyMapping [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaUserInteraction.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaUserInteraction [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaConstraint.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaConstraint [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralLoader.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaGeneralLoader [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaExporter.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaExporter [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSparseSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaSparseSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaPreconditioner.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaPreconditioner [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaHaptics.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaHaptics [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaValidation.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaValidation [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaDenseSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaDenseSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaNonUniformFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaNonUniformFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaOpenglVisual.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaOpenglVisual [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscTopology.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscTopology [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscExtra.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscExtra [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscForceField.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscForceField [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscEngine.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscEngine [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscSolver.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscSolver [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscFem.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscFem [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscMapping.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscMapping [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/CImgPlugin.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/CImgPlugin [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSphFluid.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaSphFluid [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscCollision.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SofaMiscCollision [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SoftRobots.dll [INFO] [SofaPython3] No python3 dir found in C:/Users/seergun/SOFA/v20.12.02/plugins/SoftRobots 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". __main__:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses [ERROR] [SofaPython3::SceneLoader] ModuleNotFoundError: No module named 'stlib3' At: step4.py3scn(1): <module> <frozen importlib._bootstrap>(219): _call_with_frames_removed <frozen importlib._bootstrap_external>(728): exec_module <frozen importlib._bootstrap>(677): _load_unlocked <frozen importlib._bootstrap>(696): _load C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\Lib\imp.py(171): load_source C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\Lib\imp.py(234): load_module <string>(3): <module> [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". [WARNING] [RealGUI] Global Bounding Box seems very small; Your viewer settings (based on the bbox) are likely invalid, switching to default value of [-1,-1,-1,1,1,1].This is caused by using component which does not implement properly the updateBBox function.You can remove this warning by manually forcing a value in the parameter bbox="minX minY minZ maxX maxY maxZ" in your root node
The error output is merely the same.
But this should work in this manner, right?
Thank you again,
Serkan
20 April 2021 at 15:06 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19226SerkanErgunAAUBlockedHi Guillaume,
huge thanks to you for your persistance into solving my issue.
As you already assumed, I placed SofaPython3 on top of all the plugins to be loaded.
Unfortunately,
runSofa -l SofaPython3
produces the same error ouput.Also I have a additional question:
What is the difference between stlib and stlib3 (the new py3scn scenes use stlib3 in their import command instead of stlib), in the plugin directory there is only a STLIB dir)?Thank you ever so much,
Serkan
20 April 2021 at 11:43 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19223SerkanErgunAAUBlockedPart A)
with PYTHONPATH and SOFA_ROOT set according to HugoC:\Users\seergun\SOFA\v20.12.02\bin>runSofa [INFO] [runSofa] PluginRepository paths = C:/Users/seergun/SOFA/v20.12.02/plugins;C:/Users/seergun/SOFA/v20.12.02/bin;C:/Users/seergun/SOFA/v20.12.02/bin [INFO] [runSofa] DataRepository paths = C:/Users/seergun/SOFA/v20.12.02/share/sofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/examples;C:/Users/seergun/SOFA/v20.12.02/share/sofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/seergun/SOFA/v20.12.02/share/sofa/gui/runSofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/gui/qt [INFO] [runSofa] Loading automatically plugin list in C:\Users\seergun\SOFA\v20.12.02\bin/plugin_list.conf [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGraphComponent.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaBoundaryCondition.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralAnimationLoop.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralLinearSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaTopologyMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaUserInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaConstraint.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaExporter.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSparseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaPreconditioner.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaHaptics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaValidation.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaDenseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaNonUniformFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaOpenglVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscExtra.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscForceField.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSphFluid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/STLIB.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SoftRobots.dll [INFO] [SofaPython3] Initializing with python version 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 16:30:00) [MSC v.1900 64 bit (AMD64)] [INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files. [INFO] [SofaPython3] Intializing python Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x0000399c (most recent call first): ########## SIG 22 - SIGABRT: usually caused by an abort() or assert() ########## 17: sofa::helper::BackTrace::dump - 0x7ffd04f7733016: sofa::helper::BackTrace::sig - 0x7ffd04f7747c15: raise - 0x7ffd4031c8d014: abort - 0x7ffd4031da8013: Py_RestoreSignals - 0x7ffccf51185012: Py_FatalInitError - 0x7ffccf51158811: Py_InitializeEx - 0x7ffccf51112410: sofapython3::PythonEnvironment::importFromFile - 0x7ffccf760a0c9: sofapython3::PythonEnvironment::Init - 0x7ffccf7581388: initExternalModule - 0x7ffccf7516507: sofa::helper::system::PluginManager::loadPluginByPath - 0x7ffd04ff93946: sofa::helper::system::PluginManager::loadPluginByName - 0x7ffd04ff8ed45: sofa::helper::system::PluginManager::loadPlugin - 0x7ffd04ff8e644: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd04ffa7c83: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd04ffa7c82: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd04ffa7c81: BaseThreadInitThunk - 0x7ffd41177c100: RtlUserThreadStart - 0x7ffd4240d700[WARNING] [SofaSimulationTree] the library has not been cleaned up (sofa::simulation::tree::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::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) C:\Users\seergun\SOFA\v20.12.02\bin>
Part B)
With sofa_root and pythonpath disabled:Here runSofa launches, also the example from https://github.com/SofaDefrost/SoftRobots/tree/master/docs/thematicalDocs/T1-Elements_TetraHexaBeam/Tetra
But when I launch a file which uses STLIB I get the following error:
Microsoft Windows [Version 10.0.18363.1500] (c) 2019 Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\seergun>runSofa [INFO] [runSofa] PluginRepository paths = C:/Users/seergun/SOFA/v20.12.02/plugins;C:/Users/seergun/SOFA/v20.12.02/bin;C:/Users/seergun/SOFA/v20.12.02/bin [INFO] [runSofa] DataRepository paths = C:/Users/seergun/SOFA/v20.12.02/share/sofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/examples;C:/Users/seergun/SOFA/v20.12.02/share/sofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/seergun/SOFA/v20.12.02/share/sofa/gui/runSofa;C:/Users/seergun/SOFA/v20.12.02/share/sofa/gui/qt [INFO] [runSofa] Loading automatically plugin list in C:/Users/seergun/SOFA/v20.12.02/bin/plugin_list.conf [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGraphComponent.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaBoundaryCondition.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralAnimationLoop.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralLinearSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaTopologyMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaUserInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaConstraint.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaGeneralLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaExporter.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSparseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaPreconditioner.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaHaptics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaValidation.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaDenseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaNonUniformFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaOpenglVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscExtra.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscForceField.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaSphFluid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/STLIB.dll [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SoftRobots.dll [INFO] [SofaPython3] Initializing with python version 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 16:30:00) [MSC v.1900 64 bit (AMD64)] [INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files. [INFO] [SofaPython3] Intializing python [INFO] [SofaPython3] Added 'C:/Users/seergun/SOFA/v20.12.02/python3/site-packages' to sys.path Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'Sofa.livecoding' [INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SofaPython3.dll [INFO] [SofaPython3] Added 'C:/Users/seergun/SOFA/v20.12.02/plugins/SofaPython3/lib/python3/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". __main__:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [WARNING] [SceneCheckMissingRequiredPlugin] This scene is using component defined in plugins but is not importing the required plugins. Your scene may not work on a sofa environment with different pre-loaded plugins. To fix your scene and remove this warning you just need to cut & paste the following lines at the begining of your scene (if it is a .scn): <RequiredPlugin pluginName='SofaBoundaryCondition'/> <!-- Needed to use components [FixedConstraint, ]--> <RequiredPlugin pluginName='SofaEngine'/> <!-- Needed to use components [BoxROI, ]--> <RequiredPlugin pluginName='SofaImplicitOdeSolver'/> <!-- Needed to use components [EulerImplicitSolver, ]--> <RequiredPlugin pluginName='SofaLoader'/> <!-- Needed to use components [MeshVTKLoader, ]--> <RequiredPlugin pluginName='SofaSimpleFem'/> <!-- Needed to use components [TetrahedronFEMForceField, ]--> [INFO] [SceneCheckerVisitor] Finished validating node "root". [WARNING] [TetrahedronSetTopologyContainer(container)] getElementAroundElements: TetrahedraAroundVertexArray is empty. Be sure to call createTetrahedraAroundVertexArray first. [WARNING] [TetrahedronSetTopologyContainer(container)] CheckConnexity: Tetrahedra are missings. There is more than one connexe component. [WARNING] [TetrahedronSetTopologyContainer(container)] Data alone linked: tetrahedra [WARNING] [TetrahedronSetTopologyContainer(container)] Data alone linked: triangles [WARNING] [TetrahedronSetTopologyContainer(container)] Data alone linked: edges [ERROR] [SofaPython3::SceneLoader] ModuleNotFoundError: No module named 'stlib' At: sphere_vs_floor.pyscn(3): <module> <frozen importlib._bootstrap>(219): _call_with_frames_removed <frozen importlib._bootstrap_external>(728): exec_module <frozen importlib._bootstrap>(677): _load_unlocked <frozen importlib._bootstrap>(696): _load C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\Lib\imp.py(171): load_source C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\Lib\imp.py(234): load_module <string>(3): <module> [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". [WARNING] [RealGUI] Global Bounding Box seems very small; Your viewer settings (based on the bbox) are likely invalid, switching to default value of [-1,-1,-1,1,1,1].This is caused by using component which does not implement properly
STLIB was nevertheless loaded according to terminal output.
The files looks as follows:
import Sofa import os from stlib.scene import MainHeader, ContactHeader from stlib.visuals import ShowGrid from stlib.physics.rigid import Floor from stlib.physics.rigid import cube from stlib.solver import DefaultSolver def createScene(rootNode): .....
19 April 2021 at 07:40 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19206SerkanErgunAAUBlockedHi @hugo ,
also thanlks for your quick reply as well,
setting the variables environmentvariables (not system variables) I receive the following command window output:
(This is clearly a python error, when the path to python is not correct, I had it before I set the PYTHONPATH /PYTHONHOME to my Python 3.7 directoy correctly)[INFO] [PluginManager] Loaded plugin: C:/Users/seergun/SOFA/v20.12.02/bin/SoftRobots.dll [INFO] [SofaPython3] Initializing with python version 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 16:30:00) [MSC v.1900 64 bit (AMD64)] [INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files. [INFO] [SofaPython3] Intializing python Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x00001dc0 (most recent call first): ########## SIG 22 - SIGABRT: usually caused by an abort() or assert() ########## 17: sofa::helper::BackTrace::dump - 0x7ffa14e5733016: sofa::helper::BackTrace::sig - 0x7ffa14e5747c15: raise - 0x7ffa41efc8d014: abort - 0x7ffa41efda8013: Py_RestoreSignals - 0x7ff9d54a185012: Py_FatalInitError - 0x7ff9d54a158811: Py_InitializeEx - 0x7ff9d54a112410: sofapython3::PythonEnvironment::importFromFile - 0x7ff9d56f0a0c9: sofapython3::PythonEnvironment::Init - 0x7ff9d56e81388: initExternalModule - 0x7ff9d56e16507: sofa::helper::system::PluginManager::loadPluginByPath - 0x7ffa14ed93946: sofa::helper::system::PluginManager::loadPluginByName - 0x7ffa14ed8ed45: sofa::helper::system::PluginManager::loadPlugin - 0x7ffa14ed8e644: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffa14eda7c83: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffa14eda7c82: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffa14eda7c81: BaseThreadInitThunk - 0x7ffa427b7c100: RtlUserThreadStart - 0x7ffa444ed700[WARNING] [SofaSimulationTree] the library has not been cleaned up (sofa::simulation::tree::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::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)
Thank you both for your efforts so far.
19 April 2021 at 07:32 in reply to: [SOLVED] SofaPython3 with v20.12.02 binary install on Win10 #19205SerkanErgunAAUBlocked11 January 2021 at 11:21 in reply to: [SOLVED] FEM Simulation with SOFA -> Quantifying Displacments and Forces #18173SerkanErgunAAUBlockedHi Hugo!
I sincerely apologize for my late response. Thank you for your input. It was very helpful.
All the best,
Serkan -
AuthorPosts