12:39:49.139 [error] Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch
12:39:55.220 [error] Widget Script @finos/perspective-jupyterlab#~3.6.1 was not found on on any cdn
12:39:55.220 [warn] Widget Script Source not found for @finos/perspective-jupyterlab@~3.6.1 from cdn
12:39:55.221 [warn] Widget Script Source not found for @finos/perspective-jupyterlab@~3.6.1 from local
12:39:55.221 [error] Script source for Widget @finos/perspective-jupyterlab@~3.6.1 not found in cdn, local
12:39:55.240 [error] Widget load failure {} [ 'jsdelivr.com', 'unpkg.com' ] {
classNa<username>: 'PerspectiveModel',
moduleNa<username>: '@finos/perspective-jupyterlab',
moduleVersion: '~3.6.1',
isOnline: true,
ti<username>dout: false,
error: '{}'
}
Bug Report
PerspectiveWidgetdoesn't work in VSCode because the Jupyter extension cannot find widget frontend scripts in@finos/perspective-jupyterlab.Steps to Reproduce:
perspective-pythoninstalled.PerspectiveWidgetinstance.Expected Result:
The widget shows and works.
Actual Result:
In the cell's output, instead of the widget, a JS error is displayed, saying that the widget class could not be found. I'm paraphrasing because the error message shown was truncated and I didn't bother digging it up from logs as the cause seems clear (explained below).
VSCode displays this popup:
In the Output view (View > Output), Jupyter logs contain:
Environment:
Additional Context:
I also tried installing
perspective-pythonglobally, it didn't help.From what was said in Unable to find widget 'catboost-widget' from configured widget sources microsoft/vscode-jupyter#12763 (comment), I believe that this issue is caused by how
@finos/perspective-jupyterlabis packaged and distributed. Looking at https://www.jsdelivr.com/package/npm/@finos/perspective-jupyterlab?tab=files, thedist/folder is indeed missing.Other widget labextensions work fine. To list a few: anywidget, jupyter-vuetify. They all package their files under
dist/.Based on how widget loading issues are being handed by vscode-jupyter maintainers, it seems they believe that these issues are to blame on the widget packages rather than their extension. I don't know enough about extension development for either VSCode or JupyterLab to comment on that.