- This topic has 2 replies, 2 voices, and was last updated 3 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SofaPython3 › Getting Started › [SOLVED] SofaPython3 module not found
Tagged: SOFA_2106, SofaPython3, VS2017, Windows_10
Hello,
On windows 10, SofaPython3 plugin folder and SofaPython3.dll is located in Sofa binary version v21.06.
Do i still have to compile SofaPython3 plugin out-of-tree? Because i tried to Add the plugin from GUI and it gives the error “Plugin Loading failed (C:/User/…). The specified module could not be found”.
Can we directly load the plugin without compiling it?
Thanks and regards,
The above problem was solved by setting two variables in System Variables of windows 10.
SOFA_ROOT = dirToInstallation…\SOFA\v21.06.00
PYTHONPATH = dirToInstallation…\SOFA\v21.06.00\plugins\SofaPython3\lib\python3\site-packages
Hello @Hugo,
Please can you help me in solving the following errors? My sofa program identifies the .py scenes but it does not load them properly. Loading a simple .py scene gives the following error
[ERROR] [SofaPython3::SceneLoader] RuntimeError: Unable to cast Python instance to C++ type (compile in debug mode for details)
At:
13-particle.py(7): createScene
and if i load an interactive type scene. it gives the following error
[ERROR] [SofaPython3::SceneLoader] AttributeError: module ‘Sofa’ has no attribute ‘PythonScriptController’
At:
13-particle-interactive.py(14): <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:\Users\arsal\AppData\Local\Programs\Python\Python37\Lib\imp.py(171): load_source
C:\Users\arsal\AppData\Local\Programs\Python\Python37\Lib\imp.py(234): load_module
<string>(3): <module>
Thanks and regards,
Hey @arsalan,
PythonScriptController is a SofaPython(2) component, it doesn’t exists in the python 3 plugin.
To use a controller in SofaPython3, have a look at some of the example scenes.
J-N
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.