jupyter-collaboration icon indicating copy to clipboard operation
jupyter-collaboration copied to clipboard

Nbconvert jumps to the wrong link in collaboration mode

Open SaturnTsen opened this issue 2 years ago • 6 comments

Describe the bug Nbconvert jumps to the wrong link in collaboration mode.

To Reproduce

  1. Install and activate jupyter-collaboration
  2. Open any .ipynb file
  3. File - Save and Export Notebook As - LaTeX (or other options)
  4. The server returns 404, because the the browser goes to /nbconvert/latex/RTC%3AFILENAME.ipynb?download=true instead of /nbconvert/latex/FILENAME.ipynb?download=true

Expected behavior the browser goes to /nbconvert/latex/FILENAME.ipynb?download=true

Screenshots image

image

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

SaturnTsen avatar May 17 '23 07:05 SaturnTsen

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. welcome 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:

welcome[bot] avatar May 17 '23 07:05 welcome[bot]

Thanks @minger233.

We will need to fix this in JupyterLab.

hbcarlos avatar May 25 '23 06:05 hbcarlos

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.

tuncbkose avatar Aug 23 '23 07:08 tuncbkose

There is a similar problem in nbgrader caused by the RTC: part in the path: jupyter/nbgrader#1836

ykazakov avatar Sep 22 '23 07:09 ykazakov

Also having this issue with png image files in the imageviewer using jupyterlab==4.0.7 and jupyter-collaboration==1.2.0

image

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.

tylerpotts avatar Oct 19 '23 21:10 tylerpotts

https://github.com/jupyter/nbgrader/issues/1836 For this issue is it caused by Jupyter colab or is it an nbgrader issue?

milandeepbassi avatar Feb 25 '24 10:02 milandeepbassi

It's been about eight months since the last message on this bug. Is there any update on it?

emacsen avatar Oct 24 '24 20:10 emacsen

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

davidbrochart avatar Oct 25 '24 06:10 davidbrochart

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.

martinRenou avatar Oct 25 '24 07:10 martinRenou

Isn't this the same kind of issue as #202?

ykazakov avatar Oct 25 '24 07:10 ykazakov

Yes.

davidbrochart avatar Oct 25 '24 07:10 davidbrochart

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

krassowski avatar Jan 08 '25 10:01 krassowski

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.

krassowski avatar Jan 08 '25 10:01 krassowski