holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.73k stars 516 forks source link

panel save not working with last bokeh and panel #727

Closed xavArtley closed 4 years ago

xavArtley commented 4 years ago

after using pan.save('test.html') when I try to reload the file exported I get this error:

bokeh-1.4.0rc2.min.js:83 Uncaught Error: Cannot find module '@bokehjs/models/widgets/widget'
    at require (bokeh-1.4.0rc2.min.js:81)
    at Object._ (test.html:126)
    at require (bokeh-1.4.0rc2.min.js:88)
    at Object._ (test.html:124)
    at require (bokeh-1.4.0rc2.min.js:88)
    at Object._ (test.html:123)
    at require (bokeh-1.4.0rc2.min.js:88)
    at Object.main.register_plugin (bokeh-1.4.0rc2.min.js:115)
    at test.html:117
    at test.html:122
bokeh-1.4.0rc2.min.js:243 Uncaught Error: Model 'panel.models.vtk.VTKPlot' does not exist. This could be due to a widget or a custom model not being registered before first usage.
    at Object.o.Models (bokeh-1.4.0rc2.min.js:243)
    at Function.e._instantiate_object (bokeh-1.4.0rc2.min.js:242)
    at Function.e._instantiate_references_json (bokeh-1.4.0rc2.min.js:242)
    at Function.e.from_json (bokeh-1.4.0rc2.min.js:242)
    at v (bokeh-1.4.0rc2.min.js:240)
    at bokeh-1.4.0rc2.min.js:240
philippjfr commented 4 years ago

Can't reproduce this.

xavArtley commented 4 years ago

did you try with custom extension? Like :

import panel as pn
pn.extension('vtk')

dragon = pn.pane.VTK('https://raw.githubusercontent.com/Kitware/vtk-js/master/Data/StanfordDragon.vtkjs',
                     sizing_mode='stretch_width', height=400)
dragon.save('test.html')
philippjfr commented 4 years ago

Yes I did.

philippjfr commented 4 years ago

Oh right, I know what you mean now. Yes, I'm seeing the same thing.

philippjfr commented 4 years ago

Raised the issue here: https://github.com/bokeh/bokeh/issues/9343

philippjfr commented 4 years ago

Fixed upstream.