question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Environment 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]

  1. 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

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:26 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
IanMatthewHuffcommented, Dec 17, 2020

@pkuppens Does this also happen when running outside of WSL2? Wondering if we don’t download correctly when running in WSL2.

0reactions
DonJayamannecommented, Apr 13, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote access to jupyter notebook running in docker ...
I ran into a similar problem but I wasn't using Docker. I couldn't connect to the server on WSL from the local or...
Read more >
WSL2: Can't connect to Jupyter Notebook - Reddit
I've been trying to connect to a jupyter notebook running in Ubuntu WSL2, and keep getting an unreachable message. I've switched from using ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found