cytoscape / ipycytoscape

A Cytoscape Jupyter widget
https://ipycytoscape.readthedocs.io/en/master/
BSD 3-Clause "New" or "Revised" License
264 stars 62 forks source link

semver range ^1.2.2 is not registered as a widget module #294

Closed flying-sheep closed 2 years ago

flying-sheep commented 2 years ago

Bug report

Bug summary

I get the familiar error from #22 and #253:

Error displaying widget: model not found

Code for reproduction

I installed the wheel package globally using my AUR package https://aur.archlinux.org/packages/jupyterlab-extension-ipycytoscape/:

$ pacman -Qlq jupyterlab-extension-ipycytoscape | ftree
├── etc/jupyter/nbconfig/notebook.d/jupyter-cytoscape.json
└── usr
    ├── lib/python3.10/site-packages
    │           ├── ipycytoscape
    │           │   ├── __init__.py
    │           │   ├── _frontend.py
    │           │   ├── _version.py
    │           │   ├── cytoscape.py
    │           │   ├── labextension/* # as below
    │           │   ├── nbextension/* # as below
    │           │   ├── style.json
    │           │   └── tests/*.py
    │           ├── ipycytoscape-1.3.0.data/
    │           └── ipycytoscape-1.3.0.dist-info
    │               ├── LICENSE
    │               ├── METADATA
    │               ├── RECORD
    │               ├── WHEEL
    │               └── top_level.txt
    └── share/jupyter
            ├── labextensions/jupyter-cytoscape
            │       ├── package.json
            │       └── static
            │           ├── *.js
            │           ├── 981.3153022aa852d392db21.js.LICENSE.txt
            │           └── third-party-licenses.json
            └── nbextensions/jupyter-cytoscape
                    ├── extension.js
                    ├── index.js
                    └── index.js.map

It seems to be found correctly:

$ jupyter labextension list
JupyterLab v3.2.5
/usr/share/jupyter/labextensions
        nbdime-jupyterlab v2.1.1 enabled OK
        jupyter-cytoscape v1.3.0 enabled OK
        @jupyterlab/git v0.34.0 enabled OK (python, jupyterlab-git)
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK

Other labextensions (built into JupyterLab)
   app dir: /home/phil/.jupyter/lab
        @jupyterlab/geojson-extension v3.0.0 enabled OK
        @techrah/text-shortcuts v0.1.16 enabled OK
        jupyterlab-plotly v4.14.3 enabled OK

Actual outcome

Error displaying widget: model not found

Looking in the console, I see

Error: Could not create a model.
    y 272.9d70a85a9abe209402d0.js:1
    promise callback*2272/z</e.prototype.handle_comm_open 272.9d70a85a9abe209402d0.js:1
    _handleCommOpen 523.cf94b68f6edde7eefd61.js:1
    _handleCommOpen default.js:1038
    _handleMessage default.js:1206
    _msgChain default.js:110
    promise callback*19883/b/this._onWSMessage default.js:107
react_devtools_backend.js:4045:25

and

Uncaught (in promise) Error: Module jupyter-cytoscape, semver range ^1.2.2 is not registered as a widget module
    loadClass 523.cf94b68f6edde7eefd61.js:1
    _make_model 272.9d70a85a9abe209402d0.js:1
    l 272.9d70a85a9abe209402d0.js:1
    l 272.9d70a85a9abe209402d0.js:1
    S 272.9d70a85a9abe209402d0.js:1
    S 272.9d70a85a9abe209402d0.js:1
    _make_model 272.9d70a85a9abe209402d0.js:1
    new_model 272.9d70a85a9abe209402d0.js:1
    l 272.9d70a85a9abe209402d0.js:1
    l 272.9d70a85a9abe209402d0.js:1
    S 272.9d70a85a9abe209402d0.js:1
    S 272.9d70a85a9abe209402d0.js:1
    new_model 272.9d70a85a9abe209402d0.js:1
    handle_comm_open 272.9d70a85a9abe209402d0.js:1
    _handleCommOpen 523.cf94b68f6edde7eefd61.js:1
    _handleCommOpen default.js:1038
    _handleMessage default.js:1206
    _msgChain default.js:110
    promise callback*19883/b/this._onWSMessage default.js:107
523.cf94b68f6edde7eefd61.js:1:6637

Expected outcome

The widget

Version Info

ianhi commented 2 years ago

semver range ^1.2.2 is not registered as a widget module #294

Is this part of the error message you go? because it's concerning that 1.2.2 is being mentioned

ianhi commented 2 years ago

ahhhh i guess i didn't update every version string when making the release

https://github.com/cytoscape/ipycytoscape/blob/254731305e21168d8dc27c85ce9f020805376c92/ipycytoscape/_frontend.py#L15

gt-eq-1998 commented 2 years ago

Still persist when installing with pip install ipycytoscape Error: Module jupyter-cytoscape, semver range ^1.3.2 is not registered as a widget module

Version Info