widget-cookiecutter icon indicating copy to clipboard operation
widget-cookiecutter copied to clipboard

Template does not work

Open StasJ opened this issue 1 year ago • 6 comments

This template is currently broken and does not work with Jupyter Lab. The typescript template (jupyter-widgets/widget-ts-cookiecutter) is working.

StasJ avatar Mar 01 '23 19:03 StasJ

Any details on what is broken about it?

rmorshea avatar Mar 01 '23 20:03 rmorshea

Also, you might want to consider using AnyWidget instead of this template.

rmorshea avatar Mar 01 '23 20:03 rmorshea

Any details on what is broken about it?

If you follow the instructions in the README you will get a javascript error in place of a widget when attempting to use it in Jupyter Lab

Also, you might want to consider using AnyWidget instead of this template.

Thank you for the suggestion, however, we already have a completed widget built with an earlier version of the template, and the AnyWidget REAME warns it is not ready for production. Next time I hope to use that instead as it seems like a simpler solution.

StasJ avatar Mar 01 '23 23:03 StasJ

This is what the error looks like in classic notebook.

Screenshot 2023-03-06 at 9 58 25 AM

The lab dev instructions simply fail to build.

(widget_cookie) HP07M20G6J:jupyter-widget-js-cookie awatters$ jupyter labextension develop jupyter_widget_js_cookie --overwrite
Installing /Users/awatters/tmp/jupyter-widget-js-cookie/jupyter_widget_js_cookie/labextension -> jupyter-widget-js-cookie
Building extension in /Users/awatters/tmp/jupyter-widget-js-cookie/jupyter_widget_js_cookie
An error occurred.
FileNotFoundError: [Errno 2] No such file or directory: '/Users/awatters/tmp/jupyter-widget-js-cookie/jupyter_widget_js_cookie/package.json'
See the log file for details:  /var/folders/6q/d5mwddn12v7_pkq3_6cc5t8c0000gq/T/jupyterlab-debug-cdcd5odc.log
(widget_cookie) HP07M20G6J:jupyter-widget-js-cookie awatters$ 

By the way this is the same symptom I see with my own project https://github.com/AaronWatters/jp_proxy_widget which is why I came here....

AaronWatters avatar Mar 06 '23 15:03 AaronWatters

I think the dev build works, but not the production when the python and javascript package have different names.

maartenbreddels avatar Apr 21 '23 07:04 maartenbreddels

For me the template does not work at all. I've followed religiously the instructions and cannot execute steps like

jupyter labextension develop --overwrite jupyter_widget_example

I receive errors of the kind package.json not found in directory jupyter_widget_example

Judekeyser avatar Oct 04 '23 06:10 Judekeyser