InsightSoftwareConsortium / InsightSoftwareConsortium/itkwidgets

Error: Widgets require us to download supporting files from a 3rd party website.

Open
#396 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
624
Forks
83
PR merge metrics
No merged PRs in 30d

Description

### Problem:

Error: 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).

This occurs for me in **Visual Studio Code + Windows Subsystem for Linux (WSL2) Ubuntu 20.04 LTS + Jupyter Notebook**

The Jupyter notebook is as simple as:

```
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)

```

### Reproduces:

Always

### Consequence

The image does not display

### What have I tried?

Of course, I tried to follow the 'here' links, but the magic didn't happen in link 1, and the information in link 2 is unfortunately inadequate for me:
It says that it can be configured as follows "python.dataScience.widgetScriptSources": [ "jsdelivr.com", "unpkg.com"],

**But where??** I tried the default settings file in the .vscode directory, but the setting is not recognized.

I also did some googling, and tried stuff line making sure I did not forget things like` %matplotlib inline
`
### Final remark

This could also be a Visual Studio Code issue?! But since I started having this issue when I started including itkwidgets, I submit the issue here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.