Home › Forum › SOFA › Using SOFA › [SOLVED] Help! Model order reduction – ‘can’t find anything to animate’
Tagged: SOFA_v19.06.99, Windows 10
- This topic has 8 replies, 4 voices, and was last updated 3 years ago by Agustin Santana.
-
AuthorPosts
-
27 July 2020 at 02:22 #16957OwenBlocked
Hello SOFA community,
I’ve been really struggling to use MOR plugin to refine my mesh as I am stuck in Phase 1: add animations to the actuators. In the beginning, I thought there were some problems with my code until I tried to run the code in /ModelOrderReduction/tools with the diamondRobot.py example scene. The error was the same!
owen@owen-Precision-7540:~/Softwares/ext_plugin_repo/ModelOrderReduction/tools$ env /usr/bin/python3 /home/owen/.vscode/extensions/ms-python.python-2020.6.91350/pythonFiles/lib/python/debugpy/launcher 37001 -- "/home/owen/Softwares/ext_plugin_repo/ModelOrderReduction/tools/modelOrderReduction (copy).py" periodSaveGIE : 6 | nbTrainingSet : 8 | nbIterations : 89 ################################################## [140454713829120] processing threaded sofa task in: /tmp/sofa-launcher-hudy7wsk/phase1_snapshots.py [140454722221824] processing threaded sofa task in: /tmp/sofa-launcher-ye7ve8j6/phase1_snapshots.py [140454730614528] processing threaded sofa task in: /tmp/sofa-launcher-m2ou07so/phase1_snapshots.py [140454253991680] processing threaded sofa task in: /tmp/sofa-launcher-ke_6wi18/phase1_snapshots.py [140454730614528] processing threaded sofa task in: /tmp/sofa-launcher-5qnnnfbh/phase1_snapshots.py [140454722221824] processing threaded sofa task in: /tmp/sofa-launcher-c2grewye/phase1_snapshots.py [140454253991680] processing threaded sofa task in: /tmp/sofa-launcher-va9x0snx/phase1_snapshots.py [140454713829120] processing threaded sofa task in: /tmp/sofa-launcher-7qm24w5u/phase1_snapshots.py [140454730614528] processing threaded sofa task in: /tmp/sofa-launcher-sj2pi6rh/phase1_snapshots.py [140454722221824] processing threaded sofa task in: /tmp/sofa-launcher-eooc1zzo/phase1_snapshots.py[140454253991680] processing threaded sofa task in: /tmp/sofa-launcher-4109jlu1/phase1_snapshots.py [140454713829120] processing threaded sofa task in: /tmp/sofa-launcher-j73jk5j_/phase1_snapshots.py [140454730614528] processing threaded sofa task in: /tmp/sofa-launcher-4oa9m7vo/phase1_snapshots.py [140454253991680] processing threaded sofa task in: /tmp/sofa-launcher-o5ltym0m/phase1_snapshots.py [140454722221824] processing threaded sofa task in: /tmp/sofa-launcher-ra9rqkej/phase1_snapshots.py [140454713829120] processing threaded sofa task in: /tmp/sofa-launcher-np3l6snj/phase1_snapshots.py Results: directory: /tmp/sofa-launcher-hudy7wsk scene: /tmp/sofa-launcher-hudy7wsk/phase1_snapshots.py duration: 0.9852573871612549 sec Results: directory: /tmp/sofa-launcher-ye7ve8j6 scene: /tmp/sofa-launcher-ye7ve8j6/phase1_snapshots.py duration: 0.8275535106658936 sec Results: directory: /tmp/sofa-launcher-m2ou07so scene: /tmp/sofa-launcher-m2ou07so/phase1_snapshots.py duration: 0.7237608432769775 sec Results: directory: /tmp/sofa-launcher-ke_6wi18 scene: /tmp/sofa-launcher-ke_6wi18/phase1_snapshots.py duration: 0.826340913772583 sec Results: directory: /tmp/sofa-launcher-5qnnnfbh scene: /tmp/sofa-launcher-5qnnnfbh/phase1_snapshots.py duration: 0.6567695140838623 sec Results: directory: /tmp/sofa-launcher-c2grewye scene: /tmp/sofa-launcher-c2grewye/phase1_snapshots.py duration: 0.7250187397003174 sec Results: directory: /tmp/sofa-launcher-va9x0snx scene: /tmp/sofa-launcher-va9x0snx/phase1_snapshots.py duration: 0.722862958908081 sec Results: directory: /tmp/sofa-launcher-7qm24w5u scene: /tmp/sofa-launcher-7qm24w5u/phase1_snapshots.py duration: 0.7756826877593994 sec Results: directory: /tmp/sofa-launcher-sj2pi6rh scene: /tmp/sofa-launcher-sj2pi6rh/phase1_snapshots.py duration: 0.66776442527771 sec Results: directory: /tmp/sofa-launcher-eooc1zzo scene: /tmp/sofa-launcher-eooc1zzo/phase1_snapshots.py duration: 0.6990799903869629 sec Results: directory: /tmp/sofa-launcher-4109jlu1 scene: /tmp/sofa-launcher-4109jlu1/phase1_snapshots.py duration: 0.6479597091674805 sec Results: directory: /tmp/sofa-launcher-j73jk5j_ scene: /tmp/sofa-launcher-j73jk5j_/phase1_snapshots.py duration: 0.7965540885925293 sec Results: directory: /tmp/sofa-launcher-4oa9m7vo scene: /tmp/sofa-launcher-4oa9m7vo/phase1_snapshots.py duration: 0.8270905017852783 sec Results: directory: /tmp/sofa-launcher-o5ltym0m scene: /tmp/sofa-launcher-o5ltym0m/phase1_snapshots.py duration: 0.7273764610290527 sec Results: directory: /tmp/sofa-launcher-ra9rqkej scene: /tmp/sofa-launcher-ra9rqkej/phase1_snapshots.py duration: 0.8332936763763428 sec Results: directory: /tmp/sofa-launcher-np3l6snj scene: /tmp/sofa-launcher-np3l6snj/phase1_snapshots.py duration: 0.7648708820343018 sec IOError : there is no /tmp/sofa-launcher-hudy7wsk/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-ye7ve8j6/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-m2ou07so/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-ke_6wi18/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-5qnnnfbh/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-c2grewye/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-va9x0snx/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-7qm24w5u/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-sj2pi6rh/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-eooc1zzo/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-4109jlu1/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-j73jk5j_/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-4oa9m7vo/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-o5ltym0m/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-ra9rqkej/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate IOError : there is no /tmp/sofa-launcher-np3l6snj/stateFile.state , check the template log to find why. Here some clue for its probable origin : - Your animation arguments are incorrect and it hasn't find anything to animate PHASE 1 --- 3.387277126312256 seconds ---
I looked into the output.log and it says:
[ERROR] [PythonScript] SyntaxError: invalid syntax (phase1_snapshots.py, line 25)
which is
originalScene = r'('/home/owen/Softwares/ext_plugin_repo/ModelOrderReduction/tools/sofa_test_scene/diamondRobot.py', 'Sofa Scene (*.py *.pyscn)')'
I am guessing this could be a super trivial python problem because MOR was coded in Python2 and I am using Python3 in order to be compatible with PyQt5 (It was a lot of effort to rewrite the codes…) It seems like Python3 just doesn’t like this line, but I don’t really know why if it works with Python2. Can anyone suggest any solutions?
Best regards,
Owen27 July 2020 at 13:03 #16962OwenBlockedUpdate: the syntax error seems to be fixed after I changed originalScene = r’$ORIGINALSCENE’ to originalScene = r”$ORIGINALSCENE” in the phase1_snapshots template.
However, this ‘fix’ might not be correct as I got a new error:
========= STDERR-LOG============ CUDA: 1 device(s) found. CUDA: 0 : "Quadro T2000", 3112/3903 MB, 128 cores at 1.785 GHz, revision 7.5, timeout enabled CUDA: Using device 0 : "Quadro T2000" [ERROR] [PythonScript] IOError: [Errno 2] No such file or directory File "phase1_snapshots.py", line 27, in <module> originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene) [ERROR] [SofaPython] Script (file:phase1_snapshots) import error [ERROR] [SofaPython] scene script load error.
I have emailed Olivier for his opinion. Will update the post with his valuable suggestions.
Best,
Owen27 July 2020 at 14:53 #16963olivierBlockedI let @felixvanneste reply to you on this one. I think he should be able to give you a good hint, but you might have to go back to Python2
27 July 2020 at 16:30 #16964OwenBlockedHi @olivier-goury,
Yes, I agree that going back to Python2 could solve the error. The only reason I choose to use Python3 is that I found it difficult to install PyQt4 with my current version of Qt5, while PyQt5 only supports Python3.
If I understand it correctly, PyQt is for the GUI so it is essentially optional for the plugin. I am wondering if there is a no-GUI version of MOR that could let me avoid the usage of PyQt?
Best,
Owen29 July 2020 at 02:43 #16973OwenBlockedHi,
I have resolved the problem by installing a Ubuntu 18.04 virtual machine. Now MOR is running smoothly. Thus I am going to close this post now. I want to go a big thanks to Olivier for returning to Python2 is the right thing to do to solve the problem.
Best,
Owen29 July 2020 at 09:25 #16974olivierBlockedOk perfect! Do not hesitate to come back to us if you run into further issues.
Cheers,
Olivier9 November 2021 at 04:47 #20755Agustin SantanaBlockedHi everyone!
Has anybody find a solution for this issue using Python3 and Qt5? =(
I´m not really an expert on Python, but which could be the easiest way to go back to Python 2 and Qt4?
Thanks in advance!
10 November 2021 at 18:20 #20768HugoKeymasterYour question does not seem related to this post.
Could you create a dedicated post please? Could you also in this new post specify the issue that you are facing (config, SOFA version, SofaPython3 version, error log etc)Thanks a lot in advance
Hugo
11 November 2021 at 07:41 #20777Agustin SantanaBlockedHi @Hugo, sorry about the last question!
My main issue is to know if somebody has solved this topic by using Python3 and Qt5, and not necessary using Python2 and Qt4 as @Owen did…
Thanks again!
-
AuthorPosts
- You must be logged in to reply to this topic.