-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering HoloMap as GIF with matplotlib/pillow fails under Windows #3151
Comments
Thanks @smillies, this detailed investigation is very helpful. None of the core developers use windows, which is probably why this hasn't been caught. Let's aim to get a fix for this into holoviews 1.11.0 due to be released next week. |
I think the hv code in question is:
According to the Python docs, NamedTemporaryFile has different behavior in Windows:
I'm not sure what anim.save is in this case, but from that description, maybe @smillies could see if the file could be closed before anim.save and opened after for the reading step? Otherwise it would seem that anim.save would need to be rewritten to take a file handle instead of a file name, and in that case it's hard to see what the point of NamedTemporaryFile is on Windows... |
I don't think that the suggestion by @jbednar of closing and reopening the file is an option, because the Python docs also state that a temporary file will be destroyed as soon as it is closed. |
On Bokeh a small hack is performed to make NamedTemporaryFile works on windows
|
Thanks for the hint, @xavArtley . Importing
I do not feel up to testing such a change and submitting a pull request for it. Would be grateful if someone could investigate the viability of this fix. |
Thank you both, I can confirm that this change works for me. I'll submit a PR. |
Tentatively closing, please reopen if it doesn't work for you. |
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 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I 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.
The text was updated successfully, but these errors were encountered: