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

Unable to unpair ipynb in jupyter notebook #1191

Closed
hugokerstens opened this issue Dec 4, 2023 · 7 comments · Fixed by #1197
Closed

Unable to unpair ipynb in jupyter notebook #1191

hugokerstens opened this issue Dec 4, 2023 · 7 comments · Fixed by #1197
Milestone

Comments

@hugokerstens
Copy link

When working in a md file from jupyter notebook I am unable to unpair the ipynb notebook. I tried to unpair ipynb in two ways:

  • Uncheck File > Jupytext > Pair notebook with ipynb document
  • File > Jupytext > Unpair current notebook.

In both cases, jupyter.jupytext.formats: md,ipynb is unchanged in the metadata, and the ipynb output is saved.

This issue is not present when using jupyterlab, where the two ways I described above to disable pairing work as intended.

Versions used:

jupyter                       1.0.0
jupyter_client                8.6.0
jupyter-console               6.6.3
jupyter_core                  5.5.0
jupyter-events                0.9.0
jupyter-lsp                   2.2.0
jupyter_server                2.10.1
jupyter_server_terminals      0.4.4
jupyterlab                    4.0.8
jupyterlab-pygments           0.2.2
jupyterlab_server             2.25.1
jupyterlab-widgets            3.0.9
jupytext                      1.16.0
@mwouts
Copy link
Owner

mwouts commented Dec 4, 2023

Oh that's unexpected. Thanks for reporting this.
Indeed I can confirm the issue on Binder.
Do you have the same issue if you call these commands from the command palette too?

@mahendrapaipuri
Copy link
Contributor

mahendrapaipuri commented Dec 4, 2023

I can reproduce the bug too. It is wierd that it occurs only on notebook. I am in a conference all this week. I will look into it next week unless someone wants to have a look at it before. I did not notice any obvious errors in browser console while executing these commands.

We should add UI tests for notebook as well like we do for Lab. Ref #1192

@mwouts
Copy link
Owner

mwouts commented Dec 4, 2023

No worries @mahendrapaipuri, the fix for this can wait - you should make the most of your conference! If I had to make a guess I would say that there have not been many extensions for Jupyter Notebook 7 yet, so using extensions there might be a less well tested area?

@mahendrapaipuri
Copy link
Contributor

Well, JupyterLab extensions should work out-of-the-box with Notebook 7 (except for JupyterLab's launcher part). That was the design objective of Notebook 7 .So, all the extensions of JupyterLab 3 that have been upgraded to JupyterLab 4 should work with Notebook 7 (as long as we use JupyterLab's Launcher as optional dependency in the extension).

I will check next week, but it could be that notebook tracker behaving differently in JupyterLab and Notebook.

@mahendrapaipuri
Copy link
Contributor

@hugokerstens @mwouts Could you please provide me detailed steps on how to reproduce the behavior on Lab and Notebook? Cheers!!

@mwouts
Copy link
Owner

mwouts commented Dec 16, 2023

Hey @mahendrapaipuri , here are the detailed steps to reproduce:

  1. Go to Binder:notebook (or launch jupyter notebook)
  2. Click on File/New Text Notebook/New MyST Markdown Notebook
  3. Click on File/Jupytext/Pair notebook with ipynb document
  4. Click again on File/Jupytext/Pair notebook with ipynb document.

Clicking a second time does not deselect the menu entry, and the notebook metadata continues to be

jupytext:
  formats: md:myst,ipynb

@mahendrapaipuri
Copy link
Contributor

Cheers @mwouts for the instructions. I have the same behaviour with JupyterLab too. What I mean is I cannot unpair markdown notebook in the JupyterLab interface either. In the original comment @hugokerstens mentioned that the unpairing works on JupyterLab.

@mwouts Could you please test it on JupyterLab and confirm that unpairing does not work on JupyterLab too? Cheers!!

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

Successfully merging a pull request may close this issue.

3 participants