Hello,
I am trying to reproduce an example from the documentation to create an animation.
(Windows10, Anaconda python 3.6.10 h9f7ef89_2, sfepy 2020.2 py36h7725771_0 conda-forge)
Inside a Jupyter-notebook, I have done:
!copy c:\ProgramData\Anaconda3\lib\site-packages\sfepy\examples\diffusion\time_poisson.py .
!c:\ProgramData\Anaconda3\python.exe c:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\simple.py time_poisson.py -s
#everything OK
#I can view each individual vtk
#But I cannot create the animation
!c:\ProgramData\Anaconda3\python.exe c:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\postproc.py c:\ProgramData\Anaconda3\Scripts\NOTEBOOKS\cylinder.??.vtk -a mov
Traceback (most recent call last):
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\postproc.py", line 513, in <module>
main()
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\postproc.py", line 503, in main
view = view_file(filenames, filter_names, options)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\postproc.py", line 281, in view_file
domain_specific=options.domain_specific)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\postprocess\viewer.py", line 919, in call_mlab
offscreen=self.offscreen)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\postprocess\sources.py", line 68, in create_file_source
return GenericFileSource(filename, **kwargs)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\postprocess\sources.py", line 212, in __init__
self.read_common(self.filename)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\postprocess\sources.py", line 218, in read_common
self.mesh = Mesh.from_file(filename)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\fem\mesh.py", line 220, in from_file
mesh = io.read(mesh, omit_facets=omit_facets)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\fem\meshio.py", line 535, in read
fd = open(self.filename, 'r')
OSError: [Errno 22] Invalid argument: 'c:\\ProgramData\\Anaconda3\\Scripts\\NOTEBOOKS\\cylinder.??.vtk'
#Same problem with (remplacing ?? by *)
!c:\ProgramData\Anaconda3\python.exe c:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\postproc.py c:\ProgramData\Anaconda3\Scripts\NOTEBOOKS\cylinder.*.vtk -a mov
#N.B. Python has no problem to find ffmpeg
!ffmpeg -help
#is OK
#same problem when I run the command from the terminal (cmd window)
c:\ProgramData\Anaconda3\python.exe c:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\postproc.py c:\ProgramData\Anaconda3\Scripts\NOTEBOOKS\cylinder.*.vtk -a mov
*meshio.py, line 535, fd = open(self.filename, 'r')
does not want to open self.filename; there is a problem with the generic filename extraction ?*
Any help appreciated.
F.K.
P.S. Of course, when I run python postproc.py -a mov on a specific file (say cylinder.00.vtk),
I get an error:
File "postproc.py", line 508, in main
view.save_animation(options.filename)
File "c:\ProgramData\Anaconda3\lib\site-packages\sfepy\postprocess\viewer.py", line 345, in save_animation
self.set_step.step = step
AttributeError: 'Viewer' object has no attribute 'set_step'