On linux (not windows) holoviews.save() creates .html file when asking for a .png file

The issue is that in the code below I expect holoviews.save() to generate a .png file but creates a .html file instead

I use holoviews.save() to generate .png files for all sorts of other plots, but it seems like it doesn’t like this type of element. Additionally, this works just fine on my windows machine but not the Linux one which is a bit odd.

import holoviews
import holoviews.operation.datashader
import datashader.utils
import numpy

renderer = holoviews.renderer('bokeh').instance(mode='server')

# Create a holoviews.Image
ls = numpy.linspace(0, 10, 200)
xx, yy = numpy.meshgrid(ls, ls)
img = holoviews.Image(numpy.sin(xx)*numpy.cos(yy), bounds=bounds)

x_size = 1024
y_size = 768
ds_img = holoviews.operation.datashader.rasterize(img, width=x_size, height=y_size, precompute=True)
ds_img = ds_img.opts(width=x_size, height=y_size, cmap='viridis', logz=False, invert_yaxis=True)

# Ideally this will create 'ds_img.png' but instead generates a file: 'ds_img.html'
holoviews.save(ds_img, 'ds_img.png')

# This also doesnt work and fails with an exception. It was something I tried from reading another bug report
# datashader.utils.export_image(ds_img, filename='ds_img_ds.png')

Note that this has been fixed on HoloViews master and there will be a release very soon. If you want to give that a try you can install an RC release with conda install -c pyviz/label/dev holoviews

Thanks. Yep that works.

I appreciate all the work you guys do maintaining these tools. They make it amazingly simple to do some very complex visualizations.