# Code Editor Out of Sync after using Sublime Text

**URL:** <https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217>\
**Category:** JupyterLab\
**Tags:** community, help-wanted\
**Created:** [October 12, 2021, 9:48am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217 "2021-10-12T09:48:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 9:48am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/1 "2021-10-12T09:48:28Z")

</div>

Checked the Javascript console and this is what I got:  
DevTools failed to load source map: Could not load content for chrome-extension://lmbegcmkonokdjbhbamhpmkihpachdbk/content.js.map: HTTP error: status code 404, net::ERR\_UNKNOWN\_URL\_SCHEME

Can someone help me please? I tried reinstalling and it did not work.

Thank you!

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [October 12, 2021, 9:57am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/2 "2021-10-12T09:57:17Z")

</div>

What version of JupyterLab do you use?

Some editors appear to add arbitrary line endings, contrary to the notebook specification, which led to the “Code Editor Out of Sync” messages in the past, but a patch to workaround this by harmonizing the line endings was implemented recently and released in the latest JupyterLab version.

---

<div class="post-metadata">

**Author:** ![jasongrout](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jasongrout/32/371_2.png) [@jasongrout](https://discourse.jupyter.org/u/jasongrout)\
**Post date:** [October 12, 2021, 10:00am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/3 "2021-10-12T10:00:18Z")

</div>

Also, can you explain exactly, step by step, what you did? How did you use Sublime Text?

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 10:04am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/4 "2021-10-12T10:04:22Z")

</div>

I have the latest version installed

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [October 12, 2021, 10:06am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/5 "2021-10-12T10:06:04Z")

</div>

Could you please check exactly which version you have in `Help` → `About JupyterLab`? Sometimes the installed version is not the version which is running, and it helps for posterity to have the exact number on record 🙂

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 10:06am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/6 "2021-10-12T10:06:49Z")

</div>

I was writing a .py file in JupyterLab because I wanted to run it on streamlit alongside. Then, after I confirmed that the codes worked, I used sublime text to add annotations using the # sign. Afterwards, I reopened the file in Jupyterlab to run it again and thats when i received this error.

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 10:07am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/7 "2021-10-12T10:07:39Z")

</div>

Oh I see, im using Version 3.0.14

Thanks!

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [October 12, 2021, 10:10am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/8 "2021-10-12T10:10:56Z")

</div>

This is not the latest version 😉 The latest is 3.1.18 and the patch is in since 3.1.14, but I would recommend at least 3.1.16.

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [October 12, 2021, 10:12am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/9 "2021-10-12T10:12:07Z")

</div>

If that does not work, there will be another release soon with another fix (for `\r` variant).

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 10:15am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/10 "2021-10-12T10:15:50Z")

</div>

Omg hahahaha I thought it was because I just reinstalled it! Thanks for notifying 🙂

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 10:34am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/11 "2021-10-12T10:34:34Z")

</div>

Sorry, I managed to install 3.1.18 successfully, but it still gives me the same error.

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [October 12, 2021, 10:45am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/12 "2021-10-12T10:45:48Z")

</div>

Thank you for checking the latest version! Would you be able to share a minimal (redacted if needed) notebook which causes this error?

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 11:35am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/13 "2021-10-12T11:35:15Z")

</div>

Sure! How do I send it to you?

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [October 12, 2021, 11:37am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/14 "2021-10-12T11:37:56Z")

</div>

You could create a GitHub gist by dragging the notebook into the editor ([https://gist.github.com/](https://gist.github.com/)) and share the URL.

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 12, 2021, 12:15pm UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/15 "2021-10-12T12:15:48Z")

</div>

> <https://gist.github.com/gfjlcw/1367c44eac56f966eabe663a7c38ab47>

---

<div class="post-metadata">

**Author:** ![jasongrout](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jasongrout/32/371_2.png) [@jasongrout](https://discourse.jupyter.org/u/jasongrout)\
**Post date:** [October 13, 2021, 8:04pm UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/16 "2021-10-13T20:04:54Z")

</div>

I opened the file from that gist just fine in the latest JupyterLab 3.1.18. However, the gist might have cleaned up the line endings somehow, so that the gist file doesn’t exhibit the same problem as the original.

Does the Javascript console give any other errors that mention the code being out of sync, or having lots of JSON text? That is what would really help in seeing what is wrong. What we’re looking for is the line endings, between different lines in the file, i.e., `\n`, `\r`, or `\r\n`.

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/pll_llq/32/5004_2.png) [@pll\_llq](https://discourse.jupyter.org/u/pll_llq)\
**Post date:** [October 14, 2021, 6:15am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/17 "2021-10-14T06:15:51Z")

</div>

Are you using windows?

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 14, 2021, 6:23am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/18 "2021-10-14T06:23:35Z")

</div>

> [@gfjlcw](#):
>
> Could not load content for chrome-extension://lmbegcmkonokdjbhbamhpmkihpachdbk/content.js.map: HTTP error: status code 404, net::ERR\_UNKNOWN\_URL\_SCHEME

nope only errors like this but with different chrome extension urls and the codes in the screenshot

 ![Screen Shot 2021-10-14 at 2.22.50 PM](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/9/9edecfe0a6912886091280ac29949e9c9dc50b15.jpeg)

---

<div class="post-metadata">

**Author:** ![gfjlcw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/gfjlcw/32/5450_2.png) [@gfjlcw](https://discourse.jupyter.org/u/gfjlcw)\
**Post date:** [October 14, 2021, 6:24am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/19 "2021-10-14T06:24:05Z")

</div>

nope, im using a mac

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [October 14, 2021, 10:36am UTC](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217/20 "2021-10-14T10:36:51Z")

</div>

So it’s the line endings. Your other editor (Sublime Text) must be configured to use `\r` (you can see it on your screenshot in `import all required packages: \rimport`). @jasongrout developed a workaround for that (not yet released), but I don’t remember if it was for notebooks only, or for the file editor as well.

In the meantime you could configure Sublime to use `\n` instead. Maybe [Is there any way to convert file's line ending on saving? - Technical Support - Sublime Forum](https://forum.sublimetext.com/t/is-there-any-way-to-convert-files-line-ending-on-saving/25456/14) or [sublimetext3 - How do configure sublime to always convert to unix line endings on save? - Stack Overflow](https://stackoverflow.com/questions/39680585/how-do-configure-sublime-to-always-convert-to-unix-line-endings-on-save) could help with that.

[Next page](https://discourse.jupyter.org/t/code-editor-out-of-sync-after-using-sublime-text/11217.md?page=2)
