NIST-ISODB / isotherm-digitizer-panel

Contribution form for NIST adsorption isotherm database implemented using pyviz panel
2 stars 3 forks source link

Download data.json not updating data in file #34

Closed dwsideriusNIST closed 4 years ago

dwsideriusNIST commented 4 years ago

Clicking "Download data.json" multiple times without reloading the panel results in exactly duplicate data.json files.

To reproduce:

  1. fill out the form (prefill), plot, then download
  2. Go back to the form, change any field, plot, then download

The file from the second download is identical to that from the first download.

I put some tell-tales in the code and found that the problem is in plot.py here:

self.btn_download = pn.widgets.FileDownload( filename='data.json', button_type='primary', callback=self.on_click_download)

The first "download data.json" click runs the self.on_click_download function, but a subsequent click does not run the function (even though a file is downloaded). Maybe there's a file buffer? I'm looking at documentation and haven't found an indication of what is going on (yet).

dwsideriusNIST commented 4 years ago

Nevermind... this is an upstream problem: https://github.com/holoviz/panel/issues/1560

dwsideriusNIST commented 4 years ago

Fixed in panel 0.9.7