Renku base R upgrade causes Jupyter 404 error

From the logs of your session this is what we see. And it appears that this is indeed a problem with jupyter notebooks or some of its components that come with the new image.

Let me check how we can resolve this.

[E 2023-03-22 13:13:48.305 ServerApp] Uncaught exception GET /sessions/.../api/contents/notebooks/rhythmicity_analysis_genes.ipynb?type=notebook&content=1&... (127.0.0.1)
    HTTPServerRequest(protocol='http', host='renkulab.io', method='GET', uri='/sessions/.../api/contents/notebooks/rhythmicity_analysis_genes.ipynb?type=notebook&content=1&...', version='HTTP
/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server/services/contents/handlers.py", line 122, in get
        self.contents_manager.get(
      File "/opt/conda/lib/python3.10/site-packages/jupytext/contentsmanager.py", line 224, in get
        nbk = model["content"]
    TypeError: 'coroutine' object is not subscriptable
[W 2023-03-22 13:13:48.306 ServerApp] wrote error: 'Unhandled error'
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server/services/contents/handlers.py", line 122, in get
        self.contents_manager.get(
      File "/opt/conda/lib/python3.10/site-packages/jupytext/contentsmanager.py", line 224, in get
        nbk = model["content"]
    TypeError: 'coroutine' object is not subscriptable
[E 2023-03-22 13:13:48.307 ServerApp] {
      "Host": "renkulab.io",
      "Accept": "*/*",
      "Referer": "https://renkulab.io/sessions/.../lab/tree/notebooks",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0"
    }
[E 2023-03-22 13:13:48.307 ServerApp] 500 GET /sessions/.../api/contents/notebooks/rhythmicity_analysis_genes.ipynb?type=notebook&content=1&... (...@127.0.0.1) 5.
87ms referer=https://renkulab.io/sessions/.../lab/tree/notebooks
1 Like

@bopekno the problem is this line in your requirements.txt:

jupytext==1.6.0

If you simply remove that then opening jupyter notebooks works. When you remove this line then a newer version will be installed and this newer version is compatible with the rest of the jupyter components. I forked your project and tested this and it works.

Why did you pin this in the first place?

Hopefully this works for you as well. Let me know.

When you do this please rebuild your image and start a new session. I think upgrading the package in an already running session that started with the older version may not work.

It solved it thanks ! I don’t remember why I froze that jupytext version, but I did it a very, very long time ago. Everything is working as expected now.

1 Like