Typing "01" breaks cell in Jupyterlab with Julia

30 views
Skip to first unread message

Alex Boche

unread,
Oct 19, 2020, 5:15:59 PM10/19/20
to Project Jupyter
Whenever I type the character sequence "01", "02" or "0[digit]" (for any digit) into a code cell it "breaks" the cell. The cell becomes sometimes not responsive to character input and when it does accept input it is offset from where the cursor is. I don't fully understand the state of the cell after this problem occurs, but it is unusable and I can't figure out how to reverse it. I can't even salvage the contents of the cell by copying or undo.

The problem doesn't occur if I am in a comment and type in "01" or if I am in a non-code cell e.g. markdown. I also checked using a python notebook with jupyterlab and the problem didn't not exactly occur though the zero was marked in red. 

A similar problem seems to occur in class jupyter notebook rather than jupyter lab. 

I am on mac os, Jupyterlab Version 2.1.5, Julia 1.3.1. 

Perhaps I am triggering some hotkey that I don't know about?

(I'm not tech savy so I wouldn't necessarily assume that I've tried x...)

Thanks a lot-- this has been killing me.

William Stein

unread,
Oct 19, 2020, 5:31:08 PM10/19/20
to jup...@googlegroups.com
You might try upgrading to the latest version of JuptyerLab and
Julia. There have been numerous releases of both JupyterLab and Julia
that are newer than the versions you list above.

I tried to reproduce your problem using JupyterLab 2.2.2 and Julia 1.4
(both are also not the latest versions, but they are newer than
yours), but couldn't. I also tried in Jupyter Classic and CoCalc and
couldn't reproduce the problem there.

Just a guess -- did you try reproducing this problem in Incognito
mode, to reduce the chance that some browser extension is causing
trouble? Web browser extensions can sometimes break things in
unpredictable ways.

William

>
> Thanks a lot-- this has been killing me.
>
> --
> You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/ed3e97a9-09ba-4938-b9ea-8251549d53e2n%40googlegroups.com.



--
William (http://wstein.org)

Alex Boche

unread,
Oct 19, 2020, 5:53:33 PM10/19/20
to jup...@googlegroups.com
Thanks. I tried updating to Julia 1.5 but that didn't fix the problem. I don't know how to update jupyter lab. I also don't know how to open jupyterlab via incognito mode. The only way i know how to open it is to type using "IJulia; jupyterlab()" into the terminal. Then it automatically opens up in a (non-incognito) chrome browser. I did try disabling all extensions manually to no avail. 
Going back to the original problem, I noticed that when I type in such a broken cell, the column index on the bottom right keeps going up as I type even though no characters show up.

You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/Xpj3Vuvkb-8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CACLE5GCb1fYYvFnWV9Fx69QN3GO-%3Dty3%2BhXDJzC%2BwxDi9Ly4Ow%40mail.gmail.com.

Pete Blois

unread,
Oct 21, 2020, 11:21:45 AM10/21/20
to jup...@googlegroups.com
This repro's in https://mybinder.readthedocs.io/en/latest/examples/sample_repos.html#julia-binder-demo

It generates the error:
Uncaught Error: Mode julia failed to advance stream.
    at readToken (main.min.js?v=fd76f62c63dfcfdb33c73b0d15290316:11845)
    at runMode (main.min.js?v=fd76f62c63dfcfdb33c73b0d15290316:11899)
    at highlightLine (main.min.js?v=fd76f62c63dfcfdb33c73b0d15290316:11745)
    at getLineStyles (main.min.js?v=fd76f62c63dfcfdb33c73b0d15290316:11789)

I was unable to repro in JupyterLab in the same container, nor could I repro in https://codemirror.net/mode/julia/. My guess is a CodeMirror bug with syntax highlighting in Julia which has been fixed more recently.

Pete Blois

unread,
Oct 21, 2020, 11:23:39 AM10/21/20
to jup...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages