-
-
Notifications
You must be signed in to change notification settings - Fork 328
binder example not working; has javascript error. #1144
-
what should i do? same issue happens on my local machine; i cannot upgrade to reactpy, still using idom_jupyter 0.7.7 and idom 0.42.0 at this point.
Failed to create view for 'AnyView' from module 'anywidget' with model 'AnyModel' from module 'anywidget'
TypeError: this.view.on is not a function
at new JupyterReactPyClient (blob:https://notebooks.gesis.org/04201439-4de8-462a-8c7b-7decb5df5f08:1423:19)
at Module.render (blob:https://notebooks.gesis.org/04201439-4de8-462a-8c7b-7decb5df5f08:1395:14)
at AnyView.render (https://notebooks.gesis.org/binder/jupyter/user/reactive-python-reactpy-jupyter-k8xp25gq/lab/extensions/anywidget/static/326.cc621ff41abd2006f96d.js?v=cc621ff41abd2006f96d:1:2548)
at async https://notebooks.gesis.org/binder/jupyter/user/reactive-python-reactpy-jupyter-k8xp25gq/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.1a6d6a3a0542a41bec5a.js?v=1a6d6a3a0542a41bec5a:1:2951
at async w.renderModel (https://notebooks.gesis.org/binder/jupyter/user/reactive-python-reactpy-jupyter-k8xp25gq/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.402424ef4079078b2e0e.js?v=402424ef4079078b2e0e:1:72264)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 1 reply
-
Came here to post this, I have the same issue. Is there a solution/workaround? Seems like ReactPy and Ipywidgets are not playing nice anymore.
Beta Was this translation helpful? Give feedback.
All reactions
-
Upgrading anywidget may fix this
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi there, I tried the most recent anywidget 0.7.1 and downgraded to 0.7.0 - same result. However, converting any example to using "idom" does work.
for example:
from reactpy import component, html, run @component def Photo(): return html.img( { "src": "https://picsum.photos/id/237/500/300", "style": {"width": "50%"}, "alt": "Puppy", } ) Photo()
Fails with the Javascript error.
[Open Browser Console for more detailed log - Double click to close this message]
Failed to create view for 'AnyView' from module 'anywidget' with model 'AnyModel' from module 'anywidget'
TypeError: this.view.on is not a function
at new JupyterReactPyClient (blob:http://localhost:8888/dc1993ee-70cc-4013-b9ba-49385291829a:1423:19)
at Module.render (blob:http://localhost:8888/dc1993ee-70cc-4013-b9ba-49385291829a:1395:14)
at AnyView.render (http://localhost:8888/nbextensions/anywidget/index.js:172:34)
at async http://localhost:8888/nbextensions/jupyter-js-widgets/extension.js:2:775044
However --
import idom @idom.component def Photo(): return idom.html.img( { "src": "https://picsum.photos/id/237/500/300", "style": {"width": "50%"}, "alt": "Puppy", } ) Photo()
Works as expected.
Beta Was this translation helpful? Give feedback.