Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-built Extension Not Working #1

Open
rmorshea opened this issue Jan 23, 2022 · 1 comment · May be fixed by #2
Open

Pre-built Extension Not Working #1

rmorshea opened this issue Jan 23, 2022 · 1 comment · May be fixed by #2

Comments

@rmorshea
Copy link
Member

rmorshea commented Jan 23, 2022

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.

@hoxbro
Copy link

hoxbro commented Jan 23, 2022

For the jupyter lab 404 you should be able to get it work by running jupyter serverextension enable panel.io.jupyter_server_extension. An issue is created here holoviz/panel#3051 to make this command redundant.

@rmorshea rmorshea linked a pull request Jan 25, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants