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

Embed doesn't work anymore? (e.g: Syncing error: no comm channel defined) #3878

Closed
hainm opened this issue Jan 10, 2024 · 3 comments
Closed

Comments

@hainm
Copy link

hainm commented Jan 10, 2024

Hi there,

I am trying to embed nglview-js-widgets 3.1.0 in my application but getting below error:
https://www.npmjs.com/package/nglview-js-widgets

image

You could try to download index.html.txt (-> index.html) and open it to see the error message
index.html.txt

If I change the nglview-js-widgets version from 3.1.0 to 3.0.8 in the index.html, thing just work.

3.1.0 version works fine in the notebook and lab.

Do you have idea how to resolve this? Thanks.

@hainm
Copy link
Author

hainm commented Jan 10, 2024

Another way to reproduce is

pip install nglview==3.1.0 # ipywidgets 8, notebook 7

And in notebook

# 1st cell
import nglview as nv
view = nv.demo()
view

# 2nd cell
nv.write_html("index.html", view)
!open index.html

@hai-schrodinger
Copy link

hai-schrodinger commented Jan 14, 2024

Syncing error: no comm channel defined'

sync(method: string, model: WidgetModel, options: any = {}): any {
// the typing is to return `any` since the super.sync method returns a JqXHR, but we just return false if there is an error.
if (this.comm === undefined) {
throw 'Syncing error: no comm channel defined';
}

@hainm
Copy link
Author

hainm commented Jan 17, 2024

Seems like an issue with the NGL release instead: nglviewer/ngl#1014

@hainm hainm closed this as completed Jan 17, 2024
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

No branches or pull requests

2 participants