Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I fix a JupyterLab "Code Editor out of Sync" error message?

I am seeing the error message in my JupyterLab.:

"Code Editor out of Sync. 
Please open your browser JavaScript console for bug report instructions" 

Jupyter Lab version 3.0.3 and Python version 3.7.7. I'm using both Chrome and Safari. I am still seeing the same issue.

enter image description here

like image 337
user14986176 Avatar asked Jan 11 '21 20:01

user14986176


People also ask

Why is JupyterLab not working?

Jupyter doesn't load or doesn't work in the browser Try disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter. If you have security software, try turning it off temporarily, and look in the settings for a more long-term solution.

Is JupyterLab a code editor?

A JupyterLab package which defines an abstract interface to a code editor, which is used in many places in the application, including cells and the file editor.

How do you run codes on JupyterLab?

Inside the Notebook. When you open a new Jupyter notebook, you'll notice that it contains a cell. Cells are how notebooks are structured and are the areas where you write your code. To run a piece of code, click on the cell to select it, then press SHIFT+ENTER or press the play button in the toolbar above.


3 Answers

Did you download and open your colab file in your local jupyter lab ?
If so, an easy fix is to open your .ipynb colab file in notepad/notepad++ (or any text editor) and replace all \r\n with \n
This worked for me!

like image 25
Advait Shirvaikar Avatar answered Sep 18 '22 13:09

Advait Shirvaikar


I had the same problem after editing my Jupyterlab file in VS Code for Windows and then going back to Jupyterlab. The problem stems from my VS Code line ending settings. To fix the issue with the notebook I opened the notebook in the Jupyterlab Editor (1)

enter image description here

Scrolled down to confirm that line endings were \r\n (2)

enter image description here

Then Ctrl+F to find and replace all \r\n with \n (3)

enter image description here

Line endings should now be \n (4). You can now reopen the notebook.

enter image description here

Thanks @AdvaitShirvaikar for pointing me in the right direction!

like image 169
user6481870 Avatar answered Sep 16 '22 13:09

user6481870


Also, an other easy way that I found in my case was that it seems to be sufficient to create a new cell above / below the affected one, copy paste everything over and delete the old one.

like image 26
Rahul Ranjan Avatar answered Sep 20 '22 13:09

Rahul Ranjan