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.

1
  • 3
    The fix for that was merged and will be released this week as a patch release. Commented Aug 31, 2021 at 9:30

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

What should I do for conda? I'm so new in jupyter world.
conda is not a thing from jupyter world ;) I guess conda install -c conda-forge "jupyterlab>=3.1.10" may work, but I do not use conda, so this is just a guess.
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
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.