skip to Main Content

I am trying to execute python code in VS code enabling jupyter notebook execution.Repeatedly the execution screen turns gray which makes the output invisible with the headers.Code will be still executable.

Any suggestions to recover from this issue..Each time copy pasting to another notebook and rerunning is not helping to solve the issue.

enter image description here

3

Answers


  1. I also have the same issue with VScode and Jupyter notebook, in my case it only happens when the overall size of the notebook is large (more than 150 MB) which caused by keeping the output of the cells (in my case the high quality figures), this causes the notebook to crash and grey out all the outputs. The solution that I found so far is to clear the output, it won’t crash again, there is also some solution suggested by the developers here, which suggests to remove the Code cash. I would suggest to break long notebooks to smaller notebooks, or clear the output.

    Update

    I frequently had this issue with my notebooks of any size. One of the solutions was to remove the code Cache on my Windows machine (for mac users you have to find the equivalent app data on your system and remove the Cache).

    The easiest way to access the Cache folder is to open a run window and search the following line and delete the Cache as much as you can:

    %APPDATA%Code - InsidersCode Cache

    It helped me so far. Please let me know if it worked for you guys too or you found any other solutions.

    Login or Signup to reply.
  2. Removing Cache didn’t work for me, i just needed to update jupyternotebooks. So in the terminal i put this:
    pip install –upgrade jupyter jupyterlab notebook

    Then i restarted everything and now it doesn’t give me the grey screen and shows outputs again

    Login or Signup to reply.
  3. Clearing all outputs in the notebook via VS Code’s "Clear All Outputs" button (see the image below), and making sure there are no long/heavy outputs did the trick for me.

    Button in VS Code for clearing the outputs

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search