panel: Error: Model 'panel.models.markup.HTML' does not exist.

System Info

Latest MASTER after release of Panel 9.5

My Pain

I’m working on some contributions to Panel. For example at https://github.com/holoviz/panel/pull/1157 and https://github.com/holoviz/panel/pull/1122.

panel serve no longer shows any thing in the browser.

If get error messages in the browser console like

console.trace() Error: "Model 'panel.models.markup.HTML' does not exist. This could be due to a widget or a custom model not being registered before first usage."
    Models http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:1303
    _instantiate_object http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:863
    _instantiate_references_json http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:879
    from_json http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:1110
    _repull_session_doc http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:36056
bokeh.js:36082:78
    _repull_session_doc http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:36082
[bokeh] Failed to repull session Error: Model 'panel.models.markup.HTML' does not exist. This could be due to a widget or a custom model not being registered before first usage. bokeh.js:36083:34
[bokeh] Failed to load Bokeh session NMQeF9cdOy3WO0iOFwl1BA0nnY1auiiYFn0gDi1bMtKy: Error: Model 'panel.models.markup.HTML' does not exist. This could be due to a widget or a custom model not being registered before first usage. bokeh.js:35924:30
Error rendering Bokeh items: Error: "Model 'panel.models.markup.HTML' does not exist. This could be due to a widget or a custom model not being registered before first usage."
    Models http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:1303
    _instantiate_object http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:863
    _instantiate_references_json http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:879
    from_json http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:1110
    _repull_session_doc http://localhost:5006/static/js/bokeh.js?v=a4e6427fa46908492038842d99d5a1aa:36056

image

Solution

I don’t know how to solve this so instructions on how to solve this would be very appreciated.

And if I could even understand what the problem is so that I can solve similar problems on my own in the future it would be nice.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 37 (20 by maintainers)

Most upvoted comments

Bokeh 2.0.2 which fixes the issues now available on pypi and the conda bokeh channel.

Is there some way I can get the fix in so that I can start to contribute to Panel again? Or will I have to wait for a new release of Bokeh?

You can set BOKEH_RESOURCES=inline as an environment variable for now.

Ok. I’m not using conda so I have solved the problem for awesome-panel.org by downgrading to 0.9.4 via pip install panel==0.9.4 bokeh==2.0.0 holoviews==1.13.2.

Thanks.

It’s a bug in bokeh (unrelated to building extensions). Fix is available in PR https://github.com/bokeh/bokeh/pull/9901.

bokeh build didn’t complain, because of TypeScript compiler’s flexibility in resolving files, which perhaps could be considered a bug, given panel’s tsconfig.json setup. However, we can fix this in panel (and in general in all extensions), by using more explicit file inclusion policy in tsconfigs (always specify the entry point index.ts explicitly).

I’m having this issue with 0.9.5 conda-forge release and Bokeh 2.0.1, so it’s not only master.