jupyter-collaboration
jupyter-collaboration copied to clipboard
Nbconvert jumps to the wrong link in collaboration mode
Describe the bug Nbconvert jumps to the wrong link in collaboration mode.
To Reproduce
- Install and activate jupyter-collaboration
- Open any
.ipynbfile - File - Save and Export Notebook As - LaTeX (or other options)
- The server returns 404, because the the browser goes to
/nbconvert/latex/RTC%3AFILENAME.ipynb?download=trueinstead of/nbconvert/latex/FILENAME.ipynb?download=true
Expected behavior
the browser goes to /nbconvert/latex/FILENAME.ipynb?download=true
Screenshots


Desktop (please complete the following information):
- OS: Windows 11
- Browser: Edge (Chromium)
- Server Version: CentOS : LSB Version core-4.1-amd64:core-4.1-noarch Conda Version: 23.3.1 Python : 3.10.9 IPython : 8.13.1 ipykernel : 6.22.0 ipywidgets : not installed jupyter_client : 8.2.0 jupyter_core : 5.3.0 jupyter_server : 2.5.0 jupyterlab : 4.0.0rc0 nbclient : 0.7.4 nbconvert : 7.3.1 nbformat : 5.8.0 notebook : 7.0.0b1 qtconsole : not installed traitlets : 5.9.0
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Thanks @minger233.
We will need to fix this in JupyterLab.
What would be the right way to fix this? I can imagine stripping the RTC: part somewhere (here?).
But I don't know if that fixes the general problem of a different notebook path being reported/passed around just because collaboration is active, for code that expects path to be just the file path.
There is a similar problem in nbgrader caused by the RTC: part in the path: jupyter/nbgrader#1836
Also having this issue with png image files in the imageviewer using jupyterlab==4.0.7 and jupyter-collaboration==1.2.0
When looking at the path of the image I'm trying to open it's http://localhost:8888/lab/workspaces/auto-s/tree/RTC%3Aimage.png. If I remove the RTC%3A it works as expected.
https://github.com/jupyter/nbgrader/issues/1836 For this issue is it caused by Jupyter colab or is it an nbgrader issue?
It's been about eight months since the last message on this bug. Is there any update on it?
These two PRs will allow to get rid of the RTC: prefix, which should fix this issue:
- https://github.com/jupyterlab/jupyterlab/pull/16744
- https://github.com/jupyterlab/jupyterlab/pull/16794
These two PRs will allow to get rid of the RTC: prefix, which should fix this issue:
I believe this is somewhat orthogonal though. JupyterLab should handle the drive prefix properly for the nbconvert exporters.
Isn't this the same kind of issue as #202?
Yes.
The next version of jupyter-collaboration will no longer include the RTC: prefix, you can test it today, see: https://github.com/jupyterlab/jupyter-collaboration/issues/202#issuecomment-2576097564.
JupyterLab should handle the drive prefix properly for the nbconvert exporters.
I agree there is more work to be done to support drives in general. But what "properly" means? nbconvert would not know about files on drives other than the default drive managed by jupyter-server, right?
Related JupyterLab issue:
- https://github.com/jupyterlab/jupyterlab/issues/16929
I will close this issue as the future improvements for drives handling when exporting notebooks need to happen in either or both nbconvert and jupyterlab and are unrelated to collaboration itself. Let's continue the discussion in https://github.com/jupyterlab/jupyterlab/issues/16929.