JupyterLab link not opening notebook for path that is given

Hi,

I’ve been using this JupyterLab path-rewrite trick for a while (both in and out of Jupyter Books), however one of the links that has worked up until now seems to not behave the way it’s supposed to. It points to the path to a notebook, however when JupyterLab opens it only opens a folder in a parent directory a few levels up, not the notebook.

JupyterLab/MyBinder that’s not working as expected: https://mybinder.org/v2/gh/qMRLab/t1_book/master?urlpath=lab/tree/content%2F01%2Fir_blog%2FIR_SignalModelling.ipynb

Alternative link to Jupyter Notebook (which correctly opens the notebook, so the path is right): https://mybinder.org/v2/gh/qMRLab/t1_book/master?filepath=content%2F01%2Fir_blog%2FIR_SignalModelling.ipynb

Any clues as to what might be causing this, and how to resolve it?

p.s. opened an issue in my repo about it too qMRLab/t1_book#14 and the JupyterLab example repo jupyterlab/issues#7

Investigated another repo that we have built (https://mybinder.org/v2/gh/Notebook-Factory/NeuralDecoding_book/master?urlpath=lab/tree/content%2F03%2Fsubsection%2F01-03%2Fsos_notebook1.ipynb), it seems that for that one JupyterLab is behaving as expected, just not the one I have above for some reason…

This issue has been resolved.

Looks like pip recently changed how they resolve dependencies, and for some reason wasn’t showing a warning if the required upgrade was not completed.

In our Dockerfile, we had a condition for jupyterlab to be >= 0.35.4, but @zelenkastiot noticed that in our built image jupyterlab was still at version 0.34, and the Docker build log didn’t give a warning that it wasn’t being upgraded. It did however give a warning about a version conflict during the build for jinja2. Looks like another package (sos) depended on a a version of jinja2, and when the instructions to upgrade jupyterlab were run with the instructions above, because of a possible conflict it was just skipping upgrading jupyterlab altogether… Maybe pip is now treating >= 0.35.4 as a “soft” condition, because the solution was to force jupyterlab to be ==2.2.0, and now the links above open the notebooks as expected. PR that solved it is: https://github.com/qMRLab/t1_book/pull/15/files

1 Like