Skip to content

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

Description

@pkuppens

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions