Rendering HoloMap as GIF with matplotlib/pillow fails under Windows
See original GitHub issueI am trying to create an animated gif image from a series of heat maps with HoloViews. I need to do this in a Python script, i. e. specifically not in a Jupyter notebook. I am using Python 3.7 under Windows 10.
When saving the image, Python throws a PermissionError originating from PIL\Image.py line 1966 while manipulating a temporary file. However, it doesn’t seem like a user permission problem, as it happens also for users with unrestricted rights. At the point the exception happens, the temporary file has already been created on the file system.
The same code runs as expected under CentOS 7. Here’s an SSCE
Here’s another minimal example by ImportanceOfBeingErnest that removes holoviews from the picture by making a direct call to matplotlib’s FuncAnimation.save("fname", writer="pillow", fps=5)
. That works OK under Windows. So it looks like the holoviews save function might be broken.
ImportanceOfBeingErnest also played around a bit in the source code of holoviews and it also fails to save via imagemagick or imagemagick_file. (Although fixing this part of the issue is probably not a priority in view of #2460)
The source of this issue is this discussion on StackOverflow.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
On Bokeh a small hack is performed to make NamedTemporaryFile works on windows
test_themes.py
hello, i want to use render the holoviews output as gif on windows. I am facing this issue as below and now i waited a long time for the output but nothing is showing up :
WARNING:root:Points05279: Setting non-parameter attribute width=500 using a mechanism intended only for parameters WARNING:root:Points05279: Setting non-parameter attribute height=475 using a mechanism intended only for parameters WARNING:root:Points05279: Setting non-parameter attribute size=12 using a mechanism intended only for parameters WARNING:root:Points05279: Setting non-parameter attribute color=black using a mechanism intended only for parameters INFO:matplotlib.animation:Animation.save using <class ‘matplotlib.animation.PillowWriter’>