Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter-sankey-widget javascript error #127

Closed
andrewSharo opened this issue Oct 9, 2022 · 2 comments
Closed

jupyter-sankey-widget javascript error #127

andrewSharo opened this issue Oct 9, 2022 · 2 comments

Comments

@andrewSharo
Copy link

Hi Rick,

I previously used floweaver without issues, but I recently upgraded to Jupyter lab and lost all my old conda environments. I created a new conda environment for floweaver, followed your conda install directions (the jupyter nbextensions appeared to be created correctly), and I ran the following cell:

from ipysankeywidget import SankeyWidget
SankeyWidget(links=df.to_dict('records'))

and received the following javascript error in Jupyter lab:

Failed to load model class 'SankeyModel' from module 'jupyter-sankey-widget'
Error: No version of module jupyter-sankey-widget is registered
at f.loadClass (https://rage.berkeley.edu:9994/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.bcbea9feb6e7c4da7530.js?v=bcbea9feb6e7c4da7530:1:74856)
at f.loadModelClass (https://rage.berkeley.edu:9994/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:10729)
at f._make_model (https://rage.berkeley.edu:9994/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:7517)
at f.new_model (https://rage.berkeley.edu:9994/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:5137)
at f.handle_comm_open (https://rage.berkeley.edu:9994/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:3894)
at _handleCommOpen (https://rage.berkeley.edu:9994/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.bcbea9feb6e7c4da7530.js?v=bcbea9feb6e7c4da7530:1:73393)
at b._handleCommOpen (https://rage.berkeley.edu:9994/static/lab/jlab_core.081dc2b13065c79d8463.js?v=081dc2b13065c79d8463:2:994257)
at async b._handleMessage (https://rage.berkeley.edu:9994/static/lab/jlab_core.081dc2b13065c79d8463.js?v=081dc2b13065c79d8463:2:996247)

I thought maybe this was a jupyter lab issue, so I tried a jupyter notebook. Running the same cell, I received this javascript error:

Model class 'SankeyModel' from module 'jupyter-sankey-widget' is loaded but can not be instantiated
TypeError: o._deserialize_state is not a function
at u._make_model (https://rage.berkeley.edu:9994/nbextensions/jupyter-js-widgets/extension.js?v=20221008205050:2:747339)

Which seems to be making some progress. Have you seen this before? I can try on another machine, but wanted to check with you in case this was familiar or you had any ideas.

Best,
Andrew

@ricklupton
Copy link
Owner

ricklupton commented Oct 11, 2022 via email

@andrewSharo
Copy link
Author

Hi Rick,

Thanks for linking to that issue. I can confirm that downgrading the packages solved the issue. I also found that it only worked when I was running a native jupyter notebook environment. The supposed jupyter notebook environment available through jupyter lab does not work. I'm just leaving that as a note for others who may have the same issue.

Best,
Andrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants