Notebook: Typing .0 in a notebook with an IJulia kernel breaks the jupyter cell

Created on 22 May 2020  Â·  13Comments  Â·  Source: jupyter/notebook

Moved over from https://github.com/codemirror/CodeMirror/issues/6288:

When running Julia, my jupyter notebook cell stops to function properly as soon as I type .0. Concretely, as soon as I type .0 any further input isn't displayed anymore. This can also not be "undone" by trying to delete the .0 again. The cell is just completely irresponsive.

Note that 0.0 (with a prefixing zero before the decimal separator) works just fine. Also note that if I type something blindly and reload the notebook webpage, the text appears in the correct place, although without syntax highlighting.

I'm on macOS 10.15.4 Catalina, Safari 13.1 (also happens in Chrome 81.0.4044.138), Julia 1.4.1 and

➜ jupyter --version
jupyter core     : 4.6.1
jupyter-notebook : 6.0.3
qtconsole        : 4.6.0
ipython          : 7.12.0
ipykernel        : 5.1.4
jupyter client   : 5.3.4
jupyter lab      : 1.2.6
nbconvert        : 5.6.1
ipywidgets       : 7.5.1
nbformat         : 5.0.4
traitlets        : 4.3.3

I know that the issue also exists on Windows 10. With a python kernel, everything works fine.

In this severeness, only jupyter notebook is affected. In jupyter lab only the syntax highlighting breaks but the cell is still responsive:

Screenshot 2020-05-22 at 09 11 18

Over at https://github.com/codemirror/CodeMirror/issues/6288, @marijnh suggested that the reason might be that jupyter notebook is still using an old version of the julia code mirror mode.

1) Would be great if this could be fixed!
2) Is there a way for me, locally, to update the julia mode version?

Thanks in advance!

High

Most helpful comment

Not sure if I was seeing this exact thing, but something was causing my Julia cells to break codemirror, and after updating to 6.1.0rc1 then they work ok.

I suspect this is because 6.1.0rc1 is the first carrier of codemirror >= 5.50.0. It was using 5.48 or less in the previous notebook releases.

All 13 comments

Is there an easy way to find out what version of CodeMirror is being used?

This is super annoying. I just copied a URL into a jupyter notebook cell and the cell became unresponsive because the URL contained .0 somewhere.

Can confirm the same problem here. Using Jupyter Lab, Julia 1.4.1, Chromium 83.0.4103.61 snap,
Ubuntu 20.04 LTS.

$ jupyter --version
jupyter core     : 4.6.3
jupyter-notebook : 6.0.3
qtconsole        : not installed
ipython          : 7.14.0
ipykernel        : 5.2.1
jupyter client   : 6.1.3
jupyter lab      : 2.1.2
nbconvert        : 5.6.1
ipywidgets       : 7.5.1
nbformat         : 5.0.6
traitlets        : 4.3.3

$ jupyter lab --version
2.1.2

Thanks for making this a priority, @willingc. Since we're hitting this issue repeatedly in our computational physics class at the University of Cologne, can you estimate how long fixing this will take?

Is there an easy way to find out what version of CodeMirror is being used?

A quick grep yields this... bower.json: "codemirror": "components/codemirror#~5.51.0",

I'm not qualified to make a comment on this area, just trying to move this along since it was made a high priority nearly 3 weeks ago.

https://github.com/codemirror/CodeMirror/issues/6064 was fixed in 5.50.0, but maybe there was another fix subsequently. The current codemirror release is 5.55.0; is there a way to update Jupyter to use this?

I don't want to nag but I'm wondering why this takes so long to fix given that it only seems to be a version issue. Unfortunately I can't help fixing it since I have no expertise in this area whatsoever.

Since the currently referenced version of codemirror is 5.51.0 - and it should be fixed - could someone please give Notebook 6.1.0rc1 a spin with IJulia to ensure it will be fixed in the upcoming release?

pip install --upgrade --pre notebook

Not sure if I was seeing this exact thing, but something was causing my Julia cells to break codemirror, and after updating to 6.1.0rc1 then they work ok.

@akdor1154, can you try the example at the top, i.e. typing .0123?

Not sure if I was seeing this exact thing, but something was causing my Julia cells to break codemirror, and after updating to 6.1.0rc1 then they work ok.

I suspect this is because 6.1.0rc1 is the first carrier of codemirror >= 5.50.0. It was using 5.48 or less in the previous notebook releases.

@akdor1154, can you try the example at the top, i.e. typing .0123?

Yep this works. Sorry :)

I did see a codemirror hang when editing a medium-level-complexity nested list code block though... will investigate further and open a separate issue if I can work out how to reproduce.

Thanks Jarrad! I'm going to close this issue since it appears to be fixed by virtue of the codemirror update.

Was this page helpful?
0 / 5 - 0 ratings