JuliaLang / IJulia.jl

Julia kernel for Jupyter
MIT License
2.78k stars 409 forks source link

KERNEL EXCEPTION with Unicode mathbb input #1071

Open GrigorySarnitsky opened 1 year ago

GrigorySarnitsky commented 1 year ago

I am on MacOS (M2 MBA) and trying to type into the notebook 𝔸(α, β). I can successfully write 𝔸(\alpha (as \bbA Tab (\alpha), but when I press Tab, each time I get the following error:

KERNEL EXCEPTION
BoundsError: attempt to access 11-codeunit String at index [1:12]

Stacktrace:
 [1] checkbounds
   @ ./strings/basic.jl:216 [inlined]
 [2] getindex(s::String, r::UnitRange{Int64})
   @ Base ./strings/string.jl:265
 [3] complete_request(socket::ZMQ.Socket, msg::IJulia.Msg)
   @ IJulia ~/.julia/packages/IJulia/6TIq1/src/handlers.jl:115
 [4] #invokelatest#2
   @ ./essentials.jl:729 [inlined]
 [5] invokelatest
   @ ./essentials.jl:726 [inlined]
 [6] eventloop(socket::ZMQ.Socket)
   @ IJulia ~/.julia/packages/IJulia/6TIq1/src/eventloop.jl:8
 [7] (::IJulia.var"#15#18")()
   @ IJulia ./task.jl:484

I can type the string without problems in Julia's REPL.

The version of Julia, standard installation from the Julia's site:

julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 8 × Apple M2
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores

Python 3.9.6 from Apple's command line developer tools, jupyter-lab 3.6.3 installed from pip3.

UPD: I get the problem problem under Ubuntu.