Unable to use widgets (itkwidgets) non-local (WSL 2, docker, remote-ssh) scenario (was: Configuration setting of widgetScriptSources does not work/unclear)
See original GitHub issueEnvironment data
- VS Code version: 1.52.0
- Jupyter Extension version (available under the Extensions sidebar): 2020.12.xxx
- Python Extension version (available under the Extensions sidebar): 2020.12.xxx
- OS (Windows | Mac | Linux distro) and version: Windows Subsystem for Linux 2 with Ubuntu 20.04 LTS
- Python and/or Anaconda version: 3.8.5
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
- Jupyter server running: Local
Expected behaviour
I imported ‘itkwidgets’ to show an image
Actual behaviour
I get an error message:
Widgets require us to download supporting files from a 3rd party website. Click here to enable this or click here for more information. (Error loading itkwidgets:^0.32.0). Widgets require us to download supporting files from a 3rd party website. Click here to enable this or click here for more information. (Error loading itkwidgets:^0.32.0). Widgets require us to download supporting files from a 3rd party website. Click here to enable this or click here for more information. (Error loading itkwidgets:^0.32.0).
(Really, if you try 3 times, the error gets concatenated 3 times)
XXX
Steps to reproduce:
I submitted the same issue here, since I’m not sure whether it is an itkwidgets issue or a VSCode/Jupyter issue.
https://github.com/InsightSoftwareConsortium/itkwidgets/issues/396
I created this notebook that doesn’t run in my configuration
import itk
from itkwidgets import view
from urllib.request import urlretrieve
import os
# Download data
file_name = '005_32months_T2_RegT1_Reg2Atlas_ManualBrainMask_Stripped.nrrd'
if not os.path.exists(file_name):
url = 'https://data.kitware.com/api/v1/file/564a5b078d777f7522dbfaa6/download'
urlretrieve(url, file_name)
image = itk.imread(file_name)
view(image, rotate=True, axes=True, vmin=4000, vmax=17000, gradient_opacity=0.9)
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- XXX
Logs
> ~/.venv/bin/python ~/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> ~/.venv/bin/python ~/.vscode-server/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Error 2020-12-17 08:52:47: Script source for Widget itkwidgets@^0.32.0 not found
Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
XXX
Issue Analytics
- State:
- Created 3 years ago
- Comments:26 (16 by maintainers)
Top GitHub Comments
@pkuppens Does this also happen when running outside of WSL2? Wondering if we don’t download correctly when running in WSL2.
Closing this issue as its been over 4 weeks, since the information was requested. We’ll be happy to reopen the issue when the requested information has been provided.