# Possible bug: anyone know what "WARNING: Caught an exception in the keymap:" means?

**URL:** <https://discourse.julialang.org/t/possible-bug-anyone-know-what-warning-caught-an-exception-in-the-keymap-means/8609>\
**Category:** Internals & Design\
**Created:** [January 26, 2018, 9:57am UTC](https://discourse.julialang.org/t/possible-bug-anyone-know-what-warning-caught-an-exception-in-the-keymap-means/8609 "2018-01-26T09:57:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [January 26, 2018, 9:57am UTC](https://discourse.julialang.org/t/possible-bug-anyone-know-what-warning-caught-an-exception-in-the-keymap-means/8609/1 "2018-01-26T09:57:27Z")

</div>

```julia
julia> "Páll" == String(b"P\e1ll")
false

julia> String(b"P\e1ll")[1]
'P'

julia> String(b"P\e1ll")[2]
'\e'

julia> String(b"P\xe1ll")[2] # This one is also strange to me... should be "á"?
'૬'

shell> julia -e 'String(b"P\xe1ll")'

shell> julia -e 'println(String(b"P\xe1ll"))'
P�ll

julia> println(String(b"P\xe1ll"))
P�ll

julia> String(b"P\xe1ll")
"P૬"

julia> String(b"P\xe1ll") == "Páll" # I expected maybe true here.
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
false

julia> "Páll" == String(b"P\xe1ll")
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
false

julia> versioninfo()
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)

```

I realize I just filled /home, assuming with Firefox activity, do not suspect Julia:

```julia
shell> df -h
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
Filesystem Size Used Avail Use% Mounted on
udev 7,8G 0 7,8G 0% /dev
tmpfs 1,6G 42M 1,6G 3% /run
/dev/sda2 28G 11G 16G 41% /
tmpfs 7,8G 354M 7,5G 5% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 7,8G 0 7,8G 0% /sys/fs/cgroup
/dev/sda4 37G 35G 0 100% /home
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 1,6G 120K 1,6G 1% /run/user/1000

```

I thought it best to let you know, even with disk fulling up, I shouldn’t get string related errors?

I googles a bit, and found same WARNING, for other reasons:

[https://github.com/KristofferC/OhMyREPL.jl/issues/1](https://github.com/KristofferC/OhMyREPL.jl/issues/1)

[https://github.com/KristofferC/OhMyREPL.jl/commit/a66f78aef3bb3399b7b20ea36b8c83e8b523721d](https://github.com/KristofferC/OhMyREPL.jl/commit/a66f78aef3bb3399b7b20ea36b8c83e8b523721d)

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [January 26, 2018, 10:04am UTC](https://discourse.julialang.org/t/possible-bug-anyone-know-what-warning-caught-an-exception-in-the-keymap-means/8609/2 "2018-01-26T10:04:09Z")

</div>

I’ve figured out the ERROR (but not exactly why I get the WARNING; I’m however no longer alarmed by it; but would still like to know what it means; it’s puzzling why it happens here, as opposed to the ERROR), it’s simply:

> [@No space left on device](https://discourse.julialang.org/t/no-space-left-on-device/2673):
>
> Apologies - this should be in the “First Steps” sub-category, but that wouldn’t open… I’ve been using 0.4.6 on Windows for a year without problems, and have just switched to 0.5.1 so that my Windows version is the same as the Linux one on the remote cluster I use. I’m sure this is a trivially simple problem, but I don’t know the answer: Typing almost anything into the repl generates the following error: WARNING: Caught an exception in the keymap: ERROR: SystemError: flush: No space left on …

It must be because the REPL has to maintain the history file, but not when running directly (a better/clearer ERROR message, or that is WARNING, would be useful; ~~or simply disabling it for the history file~~ ).

```julia
$ julia -e "versioninfo()"
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)
qwerty@qwerty:~$ julia
               _
   _ _ _(_)_ | A fresh approach to technical computing
  (_) | (_) (_) | Documentation: http://docs.julialang.org
   _ _ _| |_ __ _ | Type "?help" for help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC)
 _/ |\ __'_|_|_|\__'_| |  
|__/ | x86_64-linux-gnu

julia> versioninfo()
WARNING: Caught an exception in the keymap:
ERROR: SystemError: flush: No space left on device
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)

```

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [January 26, 2018, 1:01pm UTC](https://discourse.julialang.org/t/possible-bug-anyone-know-what-warning-caught-an-exception-in-the-keymap-means/8609/3 "2018-01-26T13:01:12Z")

</div>

The warning is about the error (note the `:` at the end). I believe errors when saving history file, etc is infrequent enough and they are potentially important enough that we should not hide that warning by default. After all, something on your computer is very wrong and two lines of warning does not sound like very much for this problem. Since this is not really an internal error (it’s caused by the user and can be fixed by them) it would probably be more friendly to change to warning to not mention `keymap` and mention the history file instead.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [January 26, 2018, 1:20pm UTC](https://discourse.julialang.org/t/possible-bug-anyone-know-what-warning-caught-an-exception-in-the-keymap-means/8609/4 "2018-01-26T13:20:19Z")

</div>

EDIT: I’m still a little curious what the WARNING means (at least if similar can happen in non-0.5).

* * *

> [@yuyichao](#):
>
> I believe errors when saving history file, etc is infrequent enough

Right, but when it happens, “keymap” is confusing. ~~Would a (trivial) PR~~ be ok for Julia 1.0 (since there’s a feature freeze in effect), or only for 1.x?

A PR may not be needed, I see the NOTICE text in 0.5 (but not on master):

> <https://github.com/JuliaLang/julia/blob/v0.5.0/base/LineEdit.jl#L1607>

Some files got moved around, and code changed; I assume this is not a problem on master, or maybe even on 0.6. Yes, I should upgrade… and not pushing for a backport [to 0.5].

**I** understand this now, but at least changing the WARNING, eventually, could reduce the noise in Discourse.
