Plots in Altair and Plotly not shown with panel

Hi,
Today I downloaded all examples from https://github.com/holoviz/panel/tree/master/examples and run the file dynamic_tabs.ipynb.i get different results in Jupyter Notebook shown in the table below:

          **Show plot after runing each specific code**	**Show plot in Dynamic Tabs** 

Altair NO NO
Bokeh YES YES
DeckGL NO NO
HoloViews YES YES
Matplotlib YES YES
Plotly NO NO

Below are screenshots for each case:

(upload://lW8FFkrc1Qa7NoqEKQKWxo0fxph.png)

Below are the existing versions of the installed packages
altair 4.1.0
bokeh 2.0.1
conda 4.8.3
holoviews 1.13.2
jupyter 1.0.0
matplotlib 3.1.3
notebook 6.0.3
panel 0.9.5
plotly 4.5.2
python 3.7.6

Altair and Plotly plots are not shown (I tried also other Notebooks) even running from command prompt panel serve --show …ipynb . Does it a bug in Panel or something I’m missing.

Regards,
Goran

1 Like

Does sound like a bug but not one I can reproduce so far. Will play around a bit to see.

I opened .Jupyter Notebook in Chrome (last time when I have post it was in Edge, as default browser) and all 6 plots are created successfully. Still I can’t reproduce all panel dashboard in Edge environment.

When I run panel serve --show dynamic_tabs.ipynb dynamic tabs and plots are not shown (empty browser tabs both in Edge and Chrome). In Console of Inspect element I get following error messages:

  • GET http://localhost:60645/static/extensions/panel/panel.min.js net::ERR_ABORTED 404 (Not Found)

  • [bokeh] Failed to repull session Error: Model ‘panel.models.vega.VegaPlot’ does not exist. This could be due to a widget or a custom model not being registered before first usage.

  • bokeh.min.js?v=94b8cf3bbb8b644dc55f1434d37aff8f:545 [bokeh] Failed to load Bokeh session CHP8K6biahlfrT0b8boWcSQVSfBcEUFjEPDrTTEp9TKQ: Error: Model ‘panel.models.vega.VegaPlot’ does not exist. This could be due to a widget or a custom model not being registered before first usage.

I still use the same versions of packages.

Regards,
Goran

Hi @gorkir!

Your problem looks similar to issues that were recently reported on GitHub (https://github.com/holoviz/panel/issues/1260 and https://github.com/holoviz/panel/issues/1233). It seems that unfortunately there was a problem in bokeh 2.0.1 that will be fixed in bokeh 2.0.2 that should be released in the coming days.

In the meantime, you can try the workaround posted here by @pybokeh.

Let us know whether that solved your problem!
Cheers,
Maxime

2 Likes

I have changed the versions of panel to 0.9.4 and bokeh to 2.0.0. My dashboard with altair plots and widgets is shown in Chrome but in the Edge only widgets,withhout plots,are shown.
I have to say the Panel package is great tool and i’m waiting future improvements.
Best regards.
Goran Kirandziski

1 Like

Any errors on your browser’s JS console?

Hi,
Here are screenshots:

  1. Google Chrome

  2. Microsoft Edge

  3. Console messages:

Best regards,
Goran

Looks like an issue with Vega5 not being compatible with Edge. You could try patching pn.models.vega.VegaPlot.__javascript__ with earlier versions and see if that helps. Here’s what we define by default:

    __javascript__ = ["https://cdn.jsdelivr.net/npm/vega@5",
                      'https://cdn.jsdelivr.net/npm/vega-lite@4',
                      'https://cdn.jsdelivr.net/npm/vega-embed@6']