nglviewer / nglview

Jupyter widget to interactively view molecular structures and trajectories

Home Page:http://nglviewer.org/nglview/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

show_html function not working, nglview-js-widget.js missing/404 error

Raman-Shakya opened this issue · comments

Description

I am experiencing an issue with the show_html function in nglview. When I call this function to display an NGL view in an HTML page, I am getting an error message that the nglview-js-widget.js file is missing or returns a 404 error. As a result, the NGL view is not displayed.

Expected behavior

The show_html function should display the NGL view in an HTML page without any errors or missing files.

Actual behavior

The show_html function displays an error message that the nglview-js-widget.js file is missing or returns a 404 error, and the NGL view is not displayed.

Additional information

I am using nglview version 3.0.3.
I am using ipywidget version 7.7.2

Code examples

import nglview

view = nglview.demo()
nglview.write_html('temp.html', [view])

Browser Console Output

image

if I am missing something please let me know

@Raman-Shakya You need to display the viewfirst

1st cell

view = nglview.demo()
view

2nd cell

nglview.write_html('temp.html', [view])

Oo thank you! it worked!