# Issue with saving successive HoloViews plots in html

**URL:** <https://discourse.holoviz.org/t/issue-with-saving-successive-holoviews-plots-in-html/4918>\
**Category:** Panel\
**Tags:** holoviews\
**Created:** [February 8, 2023, 4:44pm UTC](https://discourse.holoviz.org/t/issue-with-saving-successive-holoviews-plots-in-html/4918 "2023-02-08T16:44:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theom](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/theom/32/4685_2.png) [@Theom](https://discourse.holoviz.org/u/Theom)\
**Post date:** [February 8, 2023, 4:44pm UTC](https://discourse.holoviz.org/t/issue-with-saving-successive-holoviews-plots-in-html/4918/1 "2023-02-08T16:44:06Z")

</div>

Hello,

I have encountered issues with saving HoloViews plots in html from successive instances of FileDownload widgets. The first time I try to get the file, it works. But if I update the layout with a new FileDownload, nothing happens when I click on the new widget.

The result is the same with hv.save or panel’s save function, with a file on disk or a file-like object. See the following code:

```python

import functools
import numpy as np
import panel as pn
import holoviews as hv

pn.extension()

def callback(clicks):
    plot = hv.Scatter(([0, 1, 2, 3, 4], clicks*np.arange(4)))
    use_panel = True
    filename = f'file{clicks}.html'
    if use_panel:
        pn.panel(plot).save(filename, embed=True)
    else:
        hv.save(plot, filename)
    return filename

def add_filedownload(event):
    col.clear()
    clicks = event.new
    col.append(pn.widgets.FileDownload(label=f'Download plot #{clicks}',
                                       callback=functools.partial(callback, clicks=clicks)))

button = pn.widgets.Button(name='Add filedownload')
button.on_click(add_filedownload)
col = pn.Column()
pn.Column(button, col).servable()

```

It works fine for png files though. Is there something wrong with my code?

I use panel 0.14.1 and holoviews 1.15.1
