Skip to content

Cannot run ccfwidget #33

@rly

Description

@rly

I cannot get ccfwidget to run. I get all sorts of errors when I try to do a simple installation from pip with the latest packages and I try to run CCFWidget() in a Jupyter Lab instance. I suspect that a few things have changed in the surrounding jupyter, widget, fsspec, and itk-related packages. @bendichter any ideas? Can you get the widget to run? On dandihub, I also run into the error in #30.

I created a fresh conda environment on my Mac M1, and installed a few older and extra packages which prevented some errors. Using Jupyter Notebook instead of Jupyter Lab to avoid dealing with registering extensions, which appears to have changed in recent jupyter versions and seems to be the cause of an error I experienced.

conda create --name temp python=3.10 --yes
conda activate temp
pip install jupyter ccfwidget yarl aiohttp "itkwidgets==0.32.5"
jupyter notebook

Input:

from ccfwidget import CCFWidget
ccf = CCFWidget()
ccf

No output or error.

In the Chrome Developer Tools console, I see:

utils.js:91 Error: Could not create a model.
    at utils.js:91:27
kernel.js:1010 Couldn't process kernel message TypeError: n._deserialize_state is not a function
    at u._make_model (manager-base.js:228:42)
manager-base.js:228 Uncaught (in promise) TypeError: n._deserialize_state is not a function
    at u._make_model (manager-base.js:228:42)
kernel.js:1010 Couldn't process kernel message TypeError: n._deserialize_state is not a function
    at u._make_model (manager-base.js:228:42)

pip list:

Package                   Version
------------------------- --------------
aiohappyeyeballs          2.4.4
aiohttp                   3.11.11
aiosignal                 1.3.2
anyio                     4.8.0
appnope                   0.1.4
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asciitree                 0.3.3
asttokens                 3.0.0
async-lru                 2.0.4
async-timeout             5.0.1
attrs                     24.3.0
babel                     2.16.0
beautifulsoup4            4.12.3
bleach                    6.2.0
ccfwidget                 0.5.3
certifi                   2024.12.14
cffi                      1.17.1
charset-normalizer        3.4.1
click                     8.1.8
cloudpickle               3.1.0
colorcet                  3.1.0
comm                      0.2.2
contourpy                 1.3.1
cycler                    0.12.1
dask                      2024.12.1
debugpy                   1.8.11
decorator                 5.1.1
defusedxml                0.7.1
exceptiongroup            1.2.2
executing                 2.1.0
fasteners                 0.19
fastjsonschema            2.21.1
fonttools                 4.55.3
fqdn                      1.5.1
frozenlist                1.5.0
fsspec                    2024.12.0
h11                       0.14.0
httpcore                  1.0.7
httpx                     0.28.1
idna                      3.10
importlib_metadata        8.5.0
ipydatawidgets            4.3.5
ipykernel                 6.29.5
ipympl                    0.9.6
ipython                   8.21.0
ipython-genutils          0.2.0
ipytree                   0.2.2
ipywidgets                7.8.5
isoduration               20.11.0
itk-core                  5.4.0
itk-filtering             5.4.0
itk-meshtopolydata        0.11.0
itk-numerics              5.4.0
itkwidgets                0.32.5
jedi                      0.19.2
Jinja2                    3.1.5
json5                     0.10.0
jsonpointer               3.0.0
jsonschema                4.23.0
jsonschema-specifications 2024.10.1
jupyter                   1.1.1
jupyter_client            8.6.3
jupyter-console           6.6.3
jupyter_core              5.7.2
jupyter-events            0.11.0
jupyter-lsp               2.2.5
jupyter_server            2.15.0
jupyter_server_terminals  0.5.3
jupyterlab                4.3.4
jupyterlab_pygments       0.3.0
jupyterlab_server         2.27.3
jupyterlab_widgets        1.1.11
kiwisolver                1.4.8
locket                    1.0.0
MarkupSafe                3.0.2
matplotlib                3.10.0
matplotlib-inline         0.1.7
mistune                   3.1.0
multidict                 6.1.0
nbclient                  0.10.2
nbconvert                 7.16.5
nbformat                  5.10.4
nest-asyncio              1.6.0
notebook                  6.4.13
notebook_shim             0.2.4
numcodecs                 0.13.1
numpy                     2.2.1
overrides                 7.7.0
packaging                 24.2
pandas                    2.2.3
pandocfilters             1.5.1
parso                     0.8.4
partd                     1.4.2
pexpect                   4.9.0
pillow                    11.1.0
pip                       24.3.1
platformdirs              4.3.6
prometheus_client         0.21.1
prompt_toolkit            3.0.48
propcache                 0.2.1
psutil                    6.1.1
ptyprocess                0.7.0
pure_eval                 0.2.3
pycparser                 2.22
Pygments                  2.19.1
pyparsing                 3.2.1
python-dateutil           2.9.0.post0
python-json-logger        3.2.1
pytz                      2024.2
PyYAML                    6.0.2
pyzmq                     26.2.0
referencing               0.35.1
requests                  2.32.3
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.22.3
Send2Trash                1.8.3
setuptools                75.6.0
six                       1.17.0
sniffio                   1.3.1
soupsieve                 2.6
stack-data                0.6.3
terminado                 0.18.1
tinycss2                  1.4.0
tomli                     2.2.1
toolz                     1.0.0
tornado                   6.4.2
traitlets                 5.6.0
traittypes                0.2.1
types-python-dateutil     2.9.0.20241206
typing_extensions         4.12.2
tzdata                    2024.2
uri-template              1.3.0
urllib3                   2.3.0
wcwidth                   0.2.13
webcolors                 24.11.1
webencodings              0.5.1
websocket-client          1.8.0
wheel                     0.45.1
widgetsnbextension        3.6.10
xarray                    2025.1.0
yarl                      1.18.3
zarr                      2.18.3
zipp                      3.21.0
zstandard                 0.23.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions