Skip to content

Pre-built Extension Not Working #1

Open
@rmorshea

Description

@rmorshea

At the moment, when running in a Jupyter Notebook I get the following errors after running each cell:

from panel import extension
extension()
In Jupyter Notebook
VM600:131 Uncaught TypeError: Cannot read properties of undefined (reading 'set_log_level')
    at inline_js (eval at append_javascript (outputarea.js:765), :131:13)
    at run_inline_js (eval at append_javascript (outputarea.js:765), :9053:22)
    at eval (eval at append_javascript (outputarea.js:765), :9068:7)
    at eval (eval at append_javascript (outputarea.js:765), :23:11)
    at Array.forEach ()
    at run_callbacks (eval at append_javascript (outputarea.js:765), :21:36)
    at HTMLLinkElement.on_load (eval at append_javascript (outputarea.js:765), :51:9)
In Jupyter Lab
This doesn't result in an error. Instead Bokeh logs:

[bokeh] setting log level to: 'info'

Upon opening the page though there's a 404 when trying to load a Jupyter Lab extension:

This seems like something's going wrong when setting up Panel. Maybe that's causing the error below?

import idom
from idom_bokeh import IDOM

@idom.component
def Demo():
    return idom.html.h1("hello")

IDOM(Demo)
In Jupyter Notebook
bokeh-2.4.2.min.js:166 Uncaught Error: Model 'IDOM' does not exist. This could be due to a widget or a custom model not being registered before first usage.
    at _.get (bokeh-2.4.2.min.js:166)
    at Function._instantiate_object (bokeh-2.4.2.min.js:165)
    at Function._instantiate_references_json (bokeh-2.4.2.min.js:165)
    at Function.from_json (bokeh-2.4.2.min.js:165)
    at Object.t.embed_items_notebook (bokeh-2.4.2.min.js:591)
    at embed_document (:5:22)
    at :8:5
    at :24:3
    at eval (eval at append_javascript (outputarea.js:765), :138:28)
    at Array.forEach ()
In Jupyter Lab
Same as for the Notebook

The latter error is odd because I'm calling register_models([IDOMView]). Maybe it's getting registered under the wrong name? Even that seems unlikely though, because in the JS bundle generated by bokeh build I can see some "IDOM" string literals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions