-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi,
I'm trying to use SofaPython3 from the conda installation.
I followed the steps and performed the tests suggested, everything works fine.
I then tried a simple python scene and got the error message in the title.
Here is a minimum reproducing example, taken from SofaPython3's documentation :
def createScene(rootNode):
import SofaRuntime
SofaRuntime.importPlugin("Sofa.Component.Visual")
rootNode.addObject("VisualGrid", nbSubdiv=10, size=1000)
return rootNode
Here is the output :
(sofa) PS C:\Users\monol> runSofa -l SofaPython3 scene.py
[INFO] [runSofa] PluginRepository paths = C:/Users/monol/anaconda3/envs/sofa/Library/bin;C:/Users/monol/anaconda3/envs/sofa/Library/plugins;C:/Users/monol/anaconda3/envs/sofa/Library/bin
[INFO] [runSofa] DataRepository paths = C:/Users/monol/anaconda3/envs/sofa/Library/share/sofa;C:/Users/monol/anaconda3/envs/sofa/Library/share/sofa/examples;C:/Users/monol/anaconda3/envs/sofa/Library/share/sofa;C:/Users/monol/anaconda3/envs/sofa/Library/share/sofa/examples;C:/Users/monol/anaconda3/envs/sofa/Library/share/sofa/icons
[INFO] [runSofa] runSofaDataRepository paths = C:/Users/monol/anaconda3/envs/sofa/Library/share/sofa/gui/runSofa;C:/Users/monol/anaconda3/envs/sofa/Library/share/sofa/gui/runSofa
[INFO] [GUIManager] Registered batch as a GUI.
[INFO] [SofaPython3] Initializing with python version 3.13.9 | packaged by conda-forge | (main, Oct 16 2025, 10:23:36) [MSC v.1944 64 bit (AMD64)]
[INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files.
[INFO] [SofaPython3] Initializing python
[INFO] [SofaPython3] Added 'C:/Users/monol/anaconda3/envs/sofa/Library/lib/python2.7/site-packages' to sys.path
---------------------------------------
Checking SOFA_ROOT and SOFAPYTHON3_ROOT
Warning: environment variable SOFA_ROOT is empty. Trying to guess it.
Warning: cannot guess SOFA_ROOT Loading SOFA libraries will likely fail and/or SOFA won't find its resources.
---------------------------------------
[INFO] [PluginManager] Loaded plugin: C:/Users/monol/anaconda3/envs/sofa/Library/bin/SofaPython3.dll
[INFO] [runSofa] Loading automatically plugin list in C:/Users/monol/anaconda3/envs/sofa/Library/bin/plugin_list.conf.default
[INFO] [PluginManager] 0 plugins have been loaded from C:/Users/monol/anaconda3/envs/sofa/Library/bin/plugin_list.conf.default
[WARNING] [GUIManager] Previously used GUI not registered. Using default GUI.
[INFO] [PluginManager] Loaded plugin: C:/Users/monol/anaconda3/envs/sofa/Library/bin/Sofa.Component.Visual.dll
[ERROR] [SofaPython3::SceneLoader] Unable to completely load the scene from file 'scene.py'.
Python exception:
AttributeError: module 'SofaRuntime' has no attribute 'getPythonCallingPoint'
At:
C:\Users\monol\scene.py(4): createScene
[INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckCollisionResponse, SceneCheckDeprecatedComponents, SceneCheckDuplicatedName, SceneCheckEmptyNodeName, 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 beginning of your scene:
root.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualGrid]
[INFO] [SceneCheckerVisitor] Finished validating node "root".
[WARNING] [Node(root)] An animation loop is required, but has not been found. Add an animation loop in the root of your scene to fix this warning. The list of available animation loop components is: [DefaultAnimationLoop]. A component of type DefaultAnimationLoop will be automatically added for you.
[INFO] [BatchGUI] Computing 1000 iterations.
[INFO] [BatchGUI] Processing.
[##################################################] 999/1000 [INFO] [BatchGUI] 1000 iterations done in 0.0163479 s ( 61169.9 FPS).
[INFO] [BatchGUI] 1000 iterations done in 0.016348 s ( 61169.6 FPS).
[##################################################] 1000/1000
[INFO] [SofaPython3.Simulation] Sofa.Simulation unload()
[INFO] [SofaPython3] Clearing Sofa.Core cache...
[INFO] [SofaPython3.Core] Sofa.Core unload()
[INFO] [SofaPython3.Helper] Sofa.Helper unload()
Finally, here is the output of conda list :
(sofa) PS C:\Users\monol> conda list
# packages in environment at C:\Users\monol\anaconda3\envs\sofa:
#
# Name Version Build Channel
_openmp_mutex 4.5 2_gnu conda-forge
archspec 0.2.5 pyhd3eb1b0_0
attrs 24.3.0 py313haa95532_0
beautifulsoup4 4.13.5 py313haa95532_0
blas 1.0 mkl
boltons 25.0.0 py313haa95532_0
brotlicffi 1.0.9.2 py313h5da7b33_1
bzip2 1.0.8 h0ad9c76_8 conda-forge
ca-certificates 2025.10.5 h4c7d964_0 conda-forge
certifi 2025.10.5 py313haa95532_0
cffi 2.0.0 py313h02ab6af_0
chardet 5.2.0 py313haa95532_0
charset-normalizer 3.3.2 pyhd3eb1b0_0
click 8.2.1 py313haa95532_0
colorama 0.4.6 py313haa95532_0
conda 25.9.1 py313haa95532_0
conda-build 25.9.0 py313hcfce1f1_0
conda-index 0.6.1 py313haa95532_0
conda-libmamba-solver 25.4.0 pyhd3eb1b0_0
conda-package-handling 2.4.0 py313haa95532_0
conda-package-streaming 0.12.0 py313haa95532_0
contourpy 1.3.1 py313h214f63a_0
cpp-expected 1.1.0 h214f63a_0
cycler 0.11.0 pyhd3eb1b0_0
distro 1.9.0 py313haa95532_0
evalidate 2.0.3 py313haa95532_0
filelock 3.17.0 py313haa95532_0
fmt 11.2.0 h58b7f6e_0
fonttools 4.60.1 py313h02ab6af_0
freetype 2.13.3 h0620614_0
frozendict 2.4.2 py313haa95532_0
glew 2.1.0 h39d44d4_2 conda-forge
glfw 3.5.0 hfd05255_0 conda-forge/label/broken
gst-plugins-base 1.24.12 h91a6125_1
gstreamer 1.24.12 hfb93a4f_1
gstreamer-orc 0.4.41 ha00e802_0
gtest 1.17.0 hc790b64_1 conda-forge
icu 75.1 he0c23c2_0 conda-forge
idna 3.7 py313haa95532_0
jinja2 3.1.6 py313haa95532_0
jsonpatch 1.33 py313haa95532_1
jsonpointer 3.0.0 py313haa95532_0
jsonschema 4.25.0 py313haa95532_0
jsonschema-specifications 2023.7.1 py313haa95532_0
kiwisolver 1.4.8 py313h5da7b33_0
krb5 1.21.3 h885b0b7_4
lcms2 2.17 hbcf6048_0 conda-forge
lerc 4.0.0 h5da7b33_0
libarchive 3.8.2 gpl_h26aea39_100 conda-forge
libblas 3.8.0 0_openblas conda-forge/label/broken
libcblas 3.8.0 0_openblas conda-forge/label/broken
libclang13 21.1.3 default_ha2db4b5_0 conda-forge
libcurl 8.15.0 h2300eb9_0
libdeflate 1.24 h76ddb4d_0 conda-forge
libexpat 2.7.1 hac47afa_0 conda-forge
libffi 3.4.6 h537db12_1 conda-forge
libflang 20.1.8 hd7fb8db_0
libfreetype 2.13.3 h57928b3_1 conda-forge
libfreetype6 2.13.3 h0b5ce68_1 conda-forge
libgcc 15.2.0 h1383e82_7 conda-forge
libglib 2.86.0 h5f26cbf_0 conda-forge
libgomp 15.2.0 h1383e82_7 conda-forge
libhwloc 2.12.1 default_h64bd3f2_1002 conda-forge
libiconv 1.18 hc1393d2_2 conda-forge
libintl 0.22.5 h5728263_3 conda-forge
libjpeg-turbo 3.1.1 h02ab6af_0
libkrb5 1.21.3 h885b0b7_4
liblapack 3.8.0 0_openblas conda-forge/label/broken
liblief 0.16.6 hac47afa_0 conda-forge
libllvm20 20.1.8 h3aa9ab2_0
liblzma 5.8.1 h2466b09_2 conda-forge
libmamba 2.3.2 h7d9f7df_0
libmambapy 2.3.2 py313h5078c03_0
libmpdec 4.0.0 h2466b09_0 conda-forge
libpng 1.6.50 h7351971_1 conda-forge
libsofa 25.06.00 ha1acdad_0 sofa-framework
libsolv 0.7.30 h23a355e_2
libsqlite 3.50.4 hf5d6505_0 conda-forge
libssh2 1.11.1 h2addb87_0
libtiff 4.7.1 h550210a_0 conda-forge
libwebp-base 1.6.0 h4d5522a_0 conda-forge
libwinpthread 12.0.0.r4.gg4f2fc60ca h57928b3_10 conda-forge
libxcb 1.17.0 h0e4246c_0 conda-forge
libxml2 2.15.0 ha29bfb0_1 conda-forge
libxml2-16 2.15.0 h06f855e_1 conda-forge
libzlib 1.3.1 h2466b09_2 conda-forge
llvm-openmp 21.1.3 hfa2b4ca_0 conda-forge
lz4-c 1.10.0 h2466b09_1 conda-forge
lzo 2.10 he774522_2
m2-conda-epoch 20250515 0_x86_64 conda-forge
m2-msys2-runtime 3.6.1.4 hc364b38_6 conda-forge
m2-patch 2.7.6.3 hc364b38_6 conda-forge
markupsafe 3.0.2 py313h827c3e9_0
matplotlib 3.10.6 py313haa95532_0
matplotlib-base 3.10.6 py313h26e45b9_0
mbedtls 3.6.3.1 he0c23c2_0 conda-forge
menuinst 2.3.1 py313h5da7b33_0
mkl 2025.2.0 hac47afa_628 conda-forge
mkl-service 2.5.2 py313h0b37514_0
mkl_fft 1.3.11 py313h5810407_1
mkl_random 1.2.8 py313hedd7022_1
msgpack-python 1.1.1 py313h5da7b33_0
nativefiledialog-extended 1.2.1 ha22e26b_3 conda-forge
nlohmann_json 3.11.2 h6c2663c_0
numpy 2.3.3 py313h050da96_1
numpy-base 2.3.3 py313h1e017a8_1
openblas 0.3.5 h8448af6_1001 conda-forge/label/broken
openjpeg 2.5.4 h24db6dd_0 conda-forge
openssl 3.5.4 h725018a_0 conda-forge
packaging 25.0 py313haa95532_0
pcre2 10.46 h5740b90_0
pillow 11.3.0 py313h641beac_1 conda-forge
pip 25.2 pyh145f28c_0 conda-forge
pkginfo 1.12.0 py313haa95532_0
platformdirs 4.3.7 py313haa95532_0
pluggy 1.5.0 py313haa95532_0
ply 3.11 py313haa95532_1
psutil 7.0.0 py313h02ab6af_0
pthread-stubs 0.3 h3c9f919_1
py-lief 0.16.6 py313hfe59770_0 conda-forge
pybind11-abi 5 hd3eb1b0_0
pycosat 0.6.6 py313h827c3e9_2
pycparser 2.23 py313haa95532_0
pyparsing 3.2.0 py313haa95532_0
pyqt 5.15.10 py313h5da7b33_1
pyqt5-sip 12.13.0 py313h827c3e9_1
pysocks 1.7.1 py313haa95532_0
python 3.13.9 hdf00ec1_100_cp313 conda-forge
python-dateutil 2.9.0post0 py313haa95532_2
python-libarchive-c 5.1 pyhd3eb1b0_0
python_abi 3.13 8_cp313 conda-forge
pytz 2025.2 py313haa95532_0
pyyaml 6.0.2 py313h827c3e9_0
qt-main 5.15.15 hb098fff_6 conda-forge
referencing 0.30.2 py313haa95532_0
reproc 14.2.4 hd77b12b_2
reproc-cpp 14.2.4 hd77b12b_2
requests 2.32.5 py313haa95532_0
rpds-py 0.22.3 py313h636fa0f_0
ruamel.yaml 0.18.10 py313h827c3e9_0
ruamel.yaml.clib 0.2.12 py313h827c3e9_0
setuptools 80.9.0 py313haa95532_0
simdjson 3.10.1 h214f63a_0
sip 6.7.12 py313h5da7b33_1
six 1.17.0 py313haa95532_0
sofa-app 25.06.00 ha1acdad_0 sofa-framework
sofa-beamadapter 25.06.00 ha1acdad_0 sofa-framework
sofa-cosserat 25.06.00 py313h9effaa5_0 sofa-framework
sofa-devel 25.06.00 h6b0baab_0 sofa-framework
sofa-gl 25.06.00 h59094ce_0 sofa-framework
sofa-glfw 25.06.00 py313he7e5006_0 sofa-framework
sofa-modelorderreduction 25.06.00 py313he7e5006_0 sofa-framework
sofa-python3 25.06.00 py313he7e5006_0 sofa-framework
sofa-softrobots 25.06.00 py313he7e5006_0 sofa-framework
sofa-stlib 25.06.00 py313he7e5006_0 sofa-framework
soupsieve 2.5 py313haa95532_0
tbb 2022.2.0 h18a62a1_1 conda-forge
tinyxml2 11.0.0 he0c23c2_0 conda-forge
tk 8.6.13 h2c6b04d_2 conda-forge
tornado 6.5.1 py313h827c3e9_0
tqdm 4.67.1 py313h4442805_0
truststore 0.10.1 py313haa95532_0
typing-extensions 4.15.0 py313haa95532_0
typing_extensions 4.15.0 py313haa95532_0
tzdata 2025b h78e105d_0 conda-forge
ucrt 10.0.22621.0 haa95532_0
urllib3 2.5.0 py313haa95532_0
vc 14.3 h2df5915_10
vc14_runtime 14.44.35208 h4927774_10
vs2015_runtime 14.44.35208 ha6b5a95_10
win_inet_pton 1.1.0 py313haa95532_0
xorg-libxau 1.0.12 h0e40799_0 conda-forge
xorg-libxdmcp 1.1.5 h0e40799_0 conda-forge
yaml 0.2.5 he774522_0
yaml-cpp 0.8.0 hd77b12b_1
zlib 1.3.1 h2466b09_2 conda-forge
zstandard 0.24.0 py313he335c29_0
zstd 1.5.7 hbeecb71_2 conda-forge
In any case, thank you for your efforts to make SOFA more user friendly !
Metadata
Metadata
Assignees
Labels
No labels