7

I am using quite large notebooks in JupyterLab to run Python code. They contain many Markdown cells with text and some images. The problem I am having is that when I close the Notebook and reopen, some of these cells have collapsed and can't be expanded (show as a horizontal line). Sometimes I will get a message telling me how many cells are hidden but they can't be expanded. Others seem to have disappeared completely.

Occasionally, I can get some cells to expand if I reload the page. I thought it may have been because I had lots of Markdown header levels and those too far down the hierarchy were collapsing. However, even removing many of the header levels has not solved the problem.

Have others had this issue and has anyone been able to resolve it? Thanks!

Edit: Thank you Vinson. My Jupyter Version is Version 3.1.7, running on Google Chrome (Version 92.0.4515.159 (Official Build) (64-bit)), on Windows machine.

user14434091
  • 95
  • 1
  • 5

2 Answers2

9

This was fixed in JupyterLab 3.1.10 (this PR) released on 2021-09-01 - the issue should disappear after you upgrade and restart JupyterLab:

# (or conda-forge equivalent if you use conda/mamba)
pip install -U "jupyterlab>=3.1.10"

If however, you are unable to update right now, you can use a workaround of disabling the placeholder rendering, by going to Advanced Settings Editor -> Notebook and in the right pane (User Preferences) paste the following:

{
    "renderCellOnIdle": false,
    "numberCellsToRenderDirectly": 10000000000000
}

then press save and reload JupyterLab.

krassowski
  • 13,598
  • 4
  • 60
  • 92
1

I do not know how to fix this with conda. But option 2 is working for me. For those who are not family with the deep tech, you can try these, two extran configure there are shown the line numbers.

{
    "markdownCellConfig": {
        "lineNumbers": true
    },
    "codeCellConfig": {
         "lineNumbers": true
    },
    "renderCellOnIdle": false,
    "numberCellsToRenderDirectly": 10000000000000
}
João Dias
  • 16,277
  • 6
  • 33
  • 45
Ray Ronnaret
  • 138
  • 2
  • 10