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

IPywidgets reference guide does not mention you should add "ipywidgets" to pn.extension #2594

Closed
MarcSkovMadsen opened this issue Jul 31, 2021 · 1 comment · Fixed by #2602
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Jul 31, 2021

I'm creating a larger app where I optionally want to display Ipywidgets/ IPyleaflet if a button is clicked. I can see that in order for ipyleaflet to get loaded on button click I need to "ipywidgets" when I run pn.extension. This is not mentioned in the reference guide https://panel.holoviz.org/reference/panes/IPyWidget.html#panes-gallery-ipywidget.

image

Solution

Replace pn.extension with pn.extension("ipywidgets") in the reference guide.

Additional Context

If I instantiate ipyleaflet as a part of serving the application ipyleaflet loads without problems.

@MarcSkovMadsen MarcSkovMadsen added TRIAGE Default label for untriaged issues type: bug Something isn't correct or isn't working and removed TRIAGE Default label for untriaged issues labels Jul 31, 2021
@MarcSkovMadsen MarcSkovMadsen added this to the v0.12.1 milestone Jul 31, 2021
@philippjfr
Copy link
Member

It's a slightly hairy issue, the problem is that if you load pn.extension('ipywidgets') in JupyterLab this will break the entire JupyterLab UI, which is why for the notebook we use a completely separate ipywidgets implementation. That said the reference guide is exactly the right place to explain those caveats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants