Closed pplonski closed 2 years ago
I've also run into the same issue, with ipydatagrid not rendering with Jupyter Notebooks exported to HTML. It did also used to work for me until recently.
The notebook was exported using: jupyter nbconvert --to html
This was the error I get:
Failed to create view for 'DataGridView' from module 'ipydatagrid' with model 'DataGridModel' from module 'ipydatagrid' TypeError: c.JupyterPhosphorPanelWidget is not a constructor at g._createElement (https://cdn.jsdelivr.net/npm/ipydatagrid@%5E1.1.11/dist/index.js:2:997709)
Any help would be much appreciated!
Thank you for reporting - we will investigate!
Failed to create view for 'DataGridView' from module 'ipydatagrid' with model 'DataGridModel' from module 'ipydatagrid' TypeError: c.JupyterPhosphorPanelWidget is not a constructor
It's probably pulling ipywidgets 8?
If it helps, I'm using ipywidgets 7.7.0 when encountering the error above.
Just in case, can you try with 7.7.2? I wonder if there is an issue with older ipywidgets that could be pulling the front-end HTMLManager for ipywidgets 8 which would be incompatible.
it's the same on 7.7.2:
I was wrong, it's actually independent from the ipywidgets version you have locally, it only depends on which HTMLManager version nbconvert pulls (by default the latest)
So can you try running nbconvert with the option --HTMLExporter.html_manager_semver_range="0.20.2"
?
yes, that's working for me now! Thanks very much for the quick response and for open sourcing such an useful package!
The
Mercury
is a framework for converting Jupyter Notebooks into web applications with YAML header. It is based on thenbconvert
tool. It collects parameters from the user interface and executes the notebook with new parameters withnbconvert
. The final HTML is displayed in the web browser for the user.One of my users has an issue with the
ipydatagrid
package. Details https://github.com/mljar/mercury/issues/159He is using the following code:
Is the
ipydatagrid
working with thenbconvert
tool? Can I export notebooks withipydatagrid
to HTML files? When I tried the above code, I got:The notebook was exported with the command:
If the
ipydatagird
will work withnbconvert
, it will work withMercury
as well.