# ┌ Error: Error in the keymap

**URL:** <https://discourse.julialang.org/t/error-error-in-the-keymap/126629>\
**Category:** General Usage\
**Created:** [March 6, 2025, 11:32am UTC](https://discourse.julialang.org/t/error-error-in-the-keymap/126629 "2025-03-06T11:32:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [March 6, 2025, 11:32am UTC](https://discourse.julialang.org/t/error-error-in-the-keymap/126629/1 "2025-03-06T11:32:44Z")

</div>

I was unable, for now, to get a MWE, but maybe this bug is already known, or the stack trace helps someone to understand what’s going on. It is simply that when trying to complete commands with TAB, sometimes I get these errors:

```julia-repl
julia> plot!(mean(mddf_compact))

julia> plot(mean(gamma_com┌ Error: Error in the keymap # tried to complete with TAB the same command as above
│ exception =
│ TypeError: in typeassert, expected REPL.REPLCompletions.MethodCompletion, got a value of type REPL.REPLCompletions.TextCompletion
│ Stacktrace:
│ [1] complete_keyword_argument
│ @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPLCompletions.jl:1040
│ [2] completions(string::String, pos::Int64, context_module::Module, shift::Bool, hint::Bool)
│ @ REPL.REPLCompletions ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPLCompletions.jl:1379
│ [3] complete_line(c::REPL.REPLCompletionProvider, s::REPL.LineEdit.PromptState, mod::Module; hint::Bool)
│ @ REPL ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:637
│ [4] #complete_line#14
│ @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:428
│ [5] complete_line
│ @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:427
│ [6] complete_line(s::REPL.LineEdit.MIState)
│ @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:369
│ [7] edit_tab(s::REPL.LineEdit.MIState, jump_spaces::Bool, delete_trailing::Bool)
│ @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2419
│ [8] edit_tab
│ @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2419 [inlined]
│ [9] (::OhMyREPL.Prompt.var"#25#52")(s::Any, data::Any, c::Any)
│ @ OhMyREPL.Prompt ~/.julia/packages/OhMyREPL/bkUhZ/src/repl.jl:267
│ [10] #invokelatest#2
│ @ ./essentials.jl:1055 [inlined]
│ [11] invokelatest
│ @ ./essentials.jl:1052 [inlined]
│ [12] (::REPL.LineEdit.var"#30#31"{OhMyREPL.Prompt.var"#25#52", String})(s::Any, p::Any)
│ @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:1711
│ [13] macro expansion
│ @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2861 [inlined]
│ [14] macro expansion
│ @ ./lock.jl:273 [inlined]
│ [15] #282
│ @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2851
└ @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2863
julia> 

```

```julia
julia> versioninfo()
Julia Version 1.11.3
Commit d63adeda50d (2025-01-21 19:42 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700F
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
Threads: 20 default, 0 interactive, 10 GC (on 20 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 20
  JULIA_PKG_PRESERVE_TIERED_INSTALLED = true

```

I have quite a few packages loaded there, and I’m using Revise and OhMyREPL. If I manage to trim down what triggers the error I’ll post here.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [March 6, 2025, 11:50am UTC](https://discourse.julialang.org/t/error-error-in-the-keymap/126629/2 "2025-03-06T11:50:46Z")

</div>

Fixed but not released yet:

> <https://github.com/JuliaLang/julia/issues/57159>
>
> In a fresh Julia 1.10.8 session, if I type \`map(a\` followed by a TAB key (for co…mpletion), I get the following error message
> 
> \`\`\`julia-repl
> julia\> map(a┌ Error: Error in the keymap
> │ exception =
> │ TypeError: in typeassert, expected REPL.REPLCompletions.MethodCompletion, got a value of type REPL.REPLCompletions.TextCompletion
> │ Stacktrace:
> │ \[1\] complete\_keyword\_argument(partial::String, last\_idx::Int64, context\_module::Module)
> │ @ REPL.REPLCompletions ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPLCompletions.jl:964
> │ \[2\] completions(string::String, pos::Int64, context\_module::Module, shift::Bool)
> │ @ REPL.REPLCompletions ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPLCompletions.jl:1261
> │ \[3\] complete\_line(c::REPL.REPLCompletionProvider, s::REPL.LineEdit.PromptState, mod::Module)
> │ @ REPL ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:545
> │ \[4\] complete\_line(s::REPL.LineEdit.PromptState, repeats::Int64, mod::Module)
> │ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:376
> │ \[5\] complete\_line(s::REPL.LineEdit.MIState)
> │ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:367
> │ \[6\] edit\_tab(s::REPL.LineEdit.MIState, jump\_spaces::Bool, delete\_trailing::Bool)
> │ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2320
> │ \[7\] edit\_tab
> │ @ ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2320 \[inlined\]
> │ \[8\] (::REPL.LineEdit.var"#114#170")(::REPL.LineEdit.MIState, ::Any, ::Vararg{Any})
> │ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2366
> │ \[9\] #invokelatest#2
> │ @ ./essentials.jl:892 \[inlined\]
> │ \[10\] invokelatest
> │ @ ./essentials.jl:889 \[inlined\]
> │ \[11\] (::REPL.LineEdit.var"#27#28"{REPL.LineEdit.var"#114#170", String})(s::Any, p::Any)
> │ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:1612
> │ \[12\] prompt!(term::REPL.Terminals.TextTerminal, prompt::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
> │ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2749
> │ \[13\] run\_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
> │ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2651
> │ \[14\] run\_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
> │ @ REPL ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1312
> │ \[15\] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
> │ @ REPL ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/REPL.jl:386
> └ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.8+0.x64.apple.darwin14/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2751
> julia\> 
> \`\`\`
> 
> The same problem appears in version 1.11.3; it was not apparent in 1.10.7 or 1.11.2.
> 
> I am running Julia on a Intel MacBook Pro.
