-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Javascript Error: IPython is not defined #8415
Comments
The Javascript interface is completely different in JupyterLab: the IPython global javascript object does not exist. We do support the payload way of adding a new code cell immediately after the current cell. See https://discourse.jupyter.org/t/how-to-programmatically-add-serveral-new-cells-in-a-notebook-in-jupyterlab/4323 |
@jasongrout Thanks for the info. I need to create a new cell programmatically in combination with ipywidgets. The first code block below works without ipywidgets. However, when the function is being called within a ipywidget event, it won't create a new cell. @SylvainCorlay That JavaScript function I posted earlier works with ipywidgets in Jupyter notebook. I am looking for a solution in JupyterLab.
|
I think payloads only work with normal cell execute requests, not with the comm messages that ipywidgets uses. |
I think there is no supported way in JupyterLab to change the notebook cells from python code (e.g., add a cell) other than the deprecated payload option in normal cell execution. |
@jasongrout Thanks for the info. In this case, I will have to use Jupyter notebook. |
I am using the following code to create a new cell programmatically. It works in Jupyter notebook, but I am getting an error
Javascript Error: IPython is not defined
in JupyteLab. Any advice? Thanks.The text was updated successfully, but these errors were encountered: