SnapshotEngine doesn't work

Asked by Aleksander G. on 2021-05-25

Hi,

I have installed recent version of Yade few days ago on a new computer (up to that time I used an older version on the other PC). I have a code that should create a snapshot (inside O.engines, among other functions): "qt.SnapshotEngine(filebase=str(path),iterPeriod=1,label='snap')"

When I try to run it i get:
"name 'SnapshotEngine' is not defined"

When I type in the terminal of the old version of Yade on the other computer "yade.qt.SnapshotEngine" i get "yade.wrapper.SnapshotEngine". In the recent version I receive "module 'yade' has no attribute 'SnapshotEngine'.

Did I miss one of the packages during the installation or the function is deprecated?

Greetings,
Aleksander

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Aleksander G.
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,
you are right, SnapshotEngine is missing.
I suspect this commit (Bruno?) [1]
Cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/commit/ff9312723ff60a01cca6c65eb648d588400639d2
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/CMakeLists.txt#L736

Revision history for this message
Aleksander G. (aleksanderg) said :
#2

Hi Jan,

Thanks for the answear. Can you tell me is there anything I can do to regain SnapshotEngine in my new Yade? I'm not so good in coding. Is it possible to download this cpp and hpp files, put them into correct folder and compile Yade again?

Cheers,
Aleksander.

Revision history for this message
Jan Stránský (honzik) said :
#3

You have two options:
- fix it yourself (and possibly push your fix to the yade repository)
- let developers to do it (in this case, please open an issue on gitlab [3])
The fix should be easy, probably some include / import / update of CMake file.

Cheers
Jan

[3] https://gitlab.com/yade-dev/trunk/-/issues/new

Revision history for this message
Aleksander G. (aleksanderg) said :
#4

Thanks Jan. Now I get it.

Cheers,
Aleksander

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#5

I'll look into it. Thank you Jan for the hints.
Bruno