I tried many different parameters (only touching the values of 'save_video', 'plot_reverse', 'fourier_N', 'animation_time' and 'n_eval') with custom images and then I ran into a problem when I set save_video to 'True'. No video was saved (I checked the whole project directory and no text.mp4 was found with my contents), and when closing the animation window -- regardless of original svg (as I tried with the original unmodified parameters again) -- I get this in terminal:
950 of 1000 pointers calculated.
Calculation of data points from coefficients done.
Animation object created.
Begin saving the video.
Traceback (most recent call last):
File "\Visualization-of-the-Fourier-series\FourierMain.py", line 149, in
main()
File "\Visualization-of-the-Fourier-series\FourierMain.py", line 144, in main
anim.save('test.mp4', writer=writer)
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 1073, in save
with mpl.rc_context({'savefig.bbox': None}), \
File "C:\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 234, in saving
self.setup(fig, outfile, dpi, *args, **kwargs)
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 320, in setup
self._w, self._h = self._adjust_frame_size()
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 309, in _adjust_frame_size
self.fig.set_size_inches(w, h, forward=True)
File "C:\Python310\lib\site-packages\matplotlib\figure.py", line 2669, in set_size_inches
manager.resize(*(size * self.dpi).astype(int))
File "C:\Python310\lib\site-packages\matplotlib\backends_backend_tk.py", line 461, in resize
self.canvas._tkcanvas.configure(width=width, height=height)
File "C:\Python310\lib\tkinter_init_.py", line 1675, in configure
return self._configure('configure', cnf, kw)
File "C:\Python310\lib\tkinter_init_.py", line 1665, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: invalid command name ".!canvas"
So something goes wrong saving the video. I made sure latest ffmpeg is installedjust in case, noticing that is used for the video (although it was not in the readme instructions). Running fresh Python 3.10.1 on Windows 11 (both Python and ffmpeg isntalled via Chocolatey with default settings, then imported all packages mentioned in the readme with pip in order for the program to run).
I tried many different parameters (only touching the values of 'save_video', 'plot_reverse', 'fourier_N', 'animation_time' and 'n_eval') with custom images and then I ran into a problem when I set
save_videoto 'True'. No video was saved (I checked the whole project directory and no text.mp4 was found with my contents), and when closing the animation window -- regardless of original svg (as I tried with the original unmodified parameters again) -- I get this in terminal:950 of 1000 pointers calculated.
Calculation of data points from coefficients done.
Animation object created.
Begin saving the video.
Traceback (most recent call last):
File "\Visualization-of-the-Fourier-series\FourierMain.py", line 149, in
main()
File "\Visualization-of-the-Fourier-series\FourierMain.py", line 144, in main
anim.save('test.mp4', writer=writer)
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 1073, in save
with mpl.rc_context({'savefig.bbox': None}), \
File "C:\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 234, in saving
self.setup(fig, outfile, dpi, *args, **kwargs)
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 320, in setup
self._w, self._h = self._adjust_frame_size()
File "C:\Python310\lib\site-packages\matplotlib\animation.py", line 309, in _adjust_frame_size
self.fig.set_size_inches(w, h, forward=True)
File "C:\Python310\lib\site-packages\matplotlib\figure.py", line 2669, in set_size_inches
manager.resize(*(size * self.dpi).astype(int))
File "C:\Python310\lib\site-packages\matplotlib\backends_backend_tk.py", line 461, in resize
self.canvas._tkcanvas.configure(width=width, height=height)
File "C:\Python310\lib\tkinter_init_.py", line 1675, in configure
return self._configure('configure', cnf, kw)
File "C:\Python310\lib\tkinter_init_.py", line 1665, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: invalid command name ".!canvas"
So something goes wrong saving the video. I made sure latest ffmpeg is installedjust in case, noticing that is used for the video (although it was not in the readme instructions). Running fresh Python 3.10.1 on Windows 11 (both Python and ffmpeg isntalled via Chocolatey with default settings, then imported all packages mentioned in the readme with pip in order for the program to run).