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

cell id changes on save #209

Closed
teucer opened this issue Jan 18, 2021 · 6 comments
Closed

cell id changes on save #209

teucer opened this issue Jan 18, 2021 · 6 comments

Comments

@teucer
Copy link

teucer commented Jan 18, 2021

I wanted to test the new cell id functionality:

  1. Opened a new jupyter notebook
  2. Added a cell with content print("hello") and saved the notebook
  3. Stored the cell id
  4. Added a second cell with the content print("world") and saved the notebook
  5. Compared the cell id of the first cell with the one stored on step 3: they are different!

Is this the intended functionality? I was under the impression that the cell id would not change once the cell is created.

@MSeal
Copy link
Contributor

MSeal commented Jan 19, 2021

Cell ids should not be changing once made. There was a known issue with jupyter UIs having this behavior and we left the nbformat changes in alpha / beta status for a couple months to give time to fix that behavior. I believe the issue is fixed but I'm not sure if it's released yet. Try updating to the latest jupyter notebook version and see if it corrects, otherwise I'd open an issue there to see when that will be shipped / if there's any remaining work for it to be correctly behaving.

@teucer
Copy link
Author

teucer commented Jan 19, 2021

I have tested again (python 3.8.5, jupyterlab 3.0.5) in a clean virtual environment, the issue persists.

@MSeal
Copy link
Contributor

MSeal commented Jan 19, 2021

Probably worth opening an issue on jupyterlab if there's not already one. I know folks over there are aware of the root issue at a minimum but my not all realize it's impacting people past beta releases of libraries.

@teucer
Copy link
Author

teucer commented Jan 20, 2021

I confirm that this is jupyterlab issue, submitted an issue

@jasongrout
Copy link
Member

Cell ids should not be changing once made.

I'll just highlight Matt's careful and technical use of language here: note that this is not a requirement of the spec (i.e., not a MUST in RFC language), but it is strongly implied in the JEP (hence a SHOULD).

@jasongrout
Copy link
Member

I think we can close this issue and shift the discussion to the jlab issue. At this time, jlab does not support cell ids (see also jupyterlab/jupyterlab#9064)

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

3 participants