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

Sometimes results of cells execution are not propagated to model (missing document_id) #23

Open
krassowski opened this issue Jul 31, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@krassowski
Copy link
Collaborator

This may not be a bug in jupyter-server-nbmodel, but certainly does have an impact on it.

Sometimes cells appear not to be executed at all - the execution counter is not set and the outputs are not shown.

image

However, inspecting with dev tools I see requests being sent:

image

When shared models are used it is the responsibility of the server extension to set the values, but maybe it does not do that?

I think this might be due to missing documentId. When if fails, this line leads assigns undefined:

const documentId = notebook.sharedModel.getState('document_id');

@krassowski krassowski added the bug Something isn't working label Jul 31, 2024
@krassowski
Copy link
Collaborator Author

It seems to work with newly created files, but not with anything that was already open.

Current best guess: the code which should set this upstream (here) does not work correctly for files which are open before the docprovider extension initialises (or something similar).

On the side of this extension, if documentId is required for the request to work, maybe it should throw or show some user-facing error to shorten the debugging loop?

@krassowski
Copy link
Collaborator Author

Closing and reopening affected notebooks seems to fix the issue. I will open an issue on jupyter-collaboration.

@krassowski
Copy link
Collaborator Author

krassowski commented Aug 2, 2024

Ah, this happens when the RTC: prefix is missing. Here is the failure scenario:

  • user created a notebook and bookmarked it, say http://localhost:8080/lab/workspaces/auto-d/tree/Training.ipynb
  • user installs jupyter-server-nbmodel[lab]
  • user goes to the bookmark (http://localhost:8080/lab/workspaces/auto-d/tree/Training.ipynb) which opens the notebook, but execution in it does not update the state at all (but is performed in the kernel). User should have changed the bookmark to http://localhost:8080/lab/workspaces/auto-d/tree/RTC%3ATraining.ipynb but they would not know about this.

Also, if extension are executing docmanager:open command they need to add the RTC: prefix (but without URI encoding).

@krassowski
Copy link
Collaborator Author

krassowski commented Aug 2, 2024

I guess there are two ways forward:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant