You have attempted to call symbol
on something other than a string or symbol (in this case a boolean). symbol
ultimately depends on the intern
method of clojure.lang.Symbol.java
, which will only accept a string argument (symbol arguments to symbol
are special-cased to return themselves). Note that symbol
will accept arguments that result in non-conformant symbols (eg (symbol "ab cd")
), but it is highly recommend that you not do so.
Forgetting brackets around a require clause causes this error. For example:
(ns error-sandbox.core
(:require clojure.walk :as walk))
A clue that this is the cause of the exception is seeing clojure.core/load-lib
in the stack trace.
The above should instead be:
(ns error-sandbox.core
(:require [clojure.walk :as walk]))
There can of course be other causes, as simple as
(symbol true)
Don't try to call symbol
on anything but a string.