jupyter-widgets / widget-cookiecutter

A cookiecutter template for creating a custom Jupyter widget project.
BSD 3-Clause "New" or "Revised" License
258 stars 72 forks source link

Newly created plugin fails to load. #61

Closed rvlander closed 4 years ago

rvlander commented 4 years ago

I followed every step on this project's README for jupyterlab.

I get the following error on jupyterlab starting:

Error: "No provider for: jupyter.extensions.jupyterWidgetRegistry."

Any hint?

Here is the pip list output:

Package            Version    Location
------------------ ---------- -------------------------------------------
attrs              19.3.0
backcall           0.1.0
bleach             3.1.5
certifi            2020.4.5.1
chardet            3.0.4
decorator          4.4.2
defusedxml         0.6.0
entrypoints        0.3
idna               2.9
ipyjsxgraph        0.1.0a0    /home/rvlander/CloudStation/WIP/ipyjsxgraph
ipykernel          5.3.0
ipython            7.14.0
ipython-genutils   0.2.0
ipywidgets         7.5.1
jedi               0.17.0
Jinja2             2.11.2
json5              0.9.4
jsonschema         3.2.0
jupyter-client     6.1.3
jupyter-core       4.6.3
jupyterlab         2.1.2
jupyterlab-server  1.1.4
MarkupSafe         1.1.1
mistune            0.8.4
nbconvert          5.6.1
nbformat           5.0.6
notebook           6.0.3
packaging          20.4
pandocfilters      1.4.2
parso              0.7.0
pexpect            4.8.0
pickleshare        0.7.5
pip                20.1.1
prometheus-client  0.7.1
prompt-toolkit     3.0.5
ptyprocess         0.6.0
Pygments           2.6.1
pyparsing          2.4.7
pyrsistent         0.16.0
python-dateutil    2.8.1
pyzmq              19.0.1
requests           2.23.0
Send2Trash         1.5.0
setuptools         46.1.3
six                1.15.0
terminado          0.8.3
testpath           0.4.4
tornado            6.0.4
traitlets          4.3.3
urllib3            1.25.9
wcwidth            0.1.9
webencodings       0.5.1
wheel              0.34.2
widgetsnbextension 3.5.1

And jupyter labextension list:

Known labextensions:
   app dir: /some_dir/ipyjsxgraph/env/share/jupyter/lab
        ipyjsxgraph v0.1.0  enabled  OK*

   local extensions:
        ipyjsxgraph: /some_dir/ipyjsxgraph/js
vidartf commented 4 years ago

jupyter labextension install @jupyter-widgets/jupyterlab-manager should do the trick. If it does, would you mind doing a PR to add that to a spot in the docs that makes sense to you?

rvlander commented 4 years ago

It did not. I still have the same error.

JupyterLab v2.1.2
Known labextensions:
   app dir: /home/rvlander/CloudStation/WIP/ipyjsxgraph/env/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        ipyjsxgraph v0.1.0  enabled  OK*

   local extensions:
        ipyjsxgraph: /home/rvlander/CloudStation/WIP/ipyjsxgraph/js

I am new to jupyter hacking. How is it architectured? How do I debug these types of error? I want to do a widget library for the jsxgraph library. Are their already known efforts for this work?

Thx

martinRenou commented 4 years ago

I suspect you should apply this patch to your package: https://github.com/jupyter-widgets/widget-cookiecutter/pull/59/files. And then reinstall the labextension for your package.

rvlander commented 4 years ago

Thanks. It is working now. The two tricks are needed. Last version of this template already integrate the aforementioned patch.