19 October 2020 at 14:32 #17418
I have started working with Sofa just recently. My aim is to use Sofa with the plugin SofaPython3. I managed to install everything (current master branch version), however when I try to run the example file SofaGui.py (from https://github.com/sofa-framework/SofaPython3/tree/master/examples) I get the following Warning:
[WARNING] [SofaViewer] Could not create file ‘…/SOFA_logo.bmp’
Valid extensions: dds
I converted the bmp file to a dds one, but the warning stays the same. Also the GUI pops up anyway, but when I try to run the same code with a simple createScene function it does not show the scene (the warning message is the same).
UPDATE: I found some mistakes in my createScene function, so now the GUI actually shows the scene. However the warning message did not disappear. Also when I try to take a screenshot within the script (using Sofa.Gui.GUIManager.SaveScreenshot) I get the message that there is no support found for bmp or png.
Does anyone have an idea how to fix this?
Any help is highly appreciated,
Thank you in advance!26 October 2020 at 16:38 #17446HugoKeymaster
Welcome on the SOFA forum and my apologies for the answer delay!
The warning you are having comes from the fact that in SOFA image formats are not supported by default. To support bpm, png etc, you need to activate the CIMG plugin.
Let me know if this helps.
PS: important notice, the SofaPython3 plugin is still in alpha version. Use it with care and do not hesitate to report any issue. Thank you for your understanding.29 October 2020 at 08:52 #17470
thank you for your response. I will try it as soon, as I can. While experimenting with other versions I got some problems with the original one. Now I am trying to reinstall it.
Jacqueline2 November 2020 at 16:32 #17519
I finally managed to install Sofa with SofaPython3 again. However I get an error message when trying to import Sofa.Gui in python. I already installed the python bindings and Sofa, Sofa.Core, SofaRuntime and Sofa.Simulation can be imported without any problems.
The error message I get for Sofa.Gui:
ImportError: libSofaMiscForceField.so.20.06.99: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File “SofaGui.py”, line 15, in <module>
Do you have an idea what I did wrong?
Thank you in advance,
Jacqueline7 December 2020 at 18:51 #17970AOBlocked
As @ScheicklP told me a few days ago you might want to type :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:Mypath/sofa/build/liband retry.
(with the correct path)
If it works you can add this line to your .bashrc file.
Alban.7 December 2020 at 18:53 #17971ScheiklBlocked
Hi @jacqueline. 🙂
That is a Linker problem.
I fixed that by adding
to my environment (conda in my case). ($SOFA_ROOT should be your build dir. E.g. /home/yourname/sofa/build/v2006)).
Adding it to your .bashrc/.zshrc/… works aswell. 🙂
- You must be logged in to reply to this topic.