0

When binding python in clojure, I encounter the following error. Please comment how to resolve this error.

Exception in thread "main" java.lang.RuntimeException: 
Unable to resolve symbol: boolean? in this context, compiling (tech/v2/datatype/casting.clj:154:5)

The configuration as following

a. project.clj

  .....
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [environ             "1.1.0"]
                 [clj-python/libpython-clj "1.44"]]
  .....

b. core.clj

(:require [clojure.core.async :refer [<!!]]
            [clojure.string :as str]
            [environ.core :refer [env]]
            [libpython-clj.require :refer [require-python]]
            [libpython-clj.python :as py :refer [py. py.. py.-]])
  .....
1
  • Add the lein-ancient plugin to all projects and use it regularly to find outdated dependencies: github.com/xsc/lein-ancient Commented May 22, 2020 at 11:05

1 Answer 1

6

The function boolean? was added in Clojure 1.9:

$ clj
Clojure 1.10.1
user=> (-> #'boolean? meta :added) 
"1.9"

Since you are using 1.8 this function is not available.

Sign up to request clarification or add additional context in comments.

4 Comments

thanks for your help. I found there are many errors after upgrade all dependencie "[org.clojure/clojure "1.10.1"] [environ "1.2.0"] [morse "0.4.2"] [clj-python/libpython-clj "1.44"]". I am going to figure out what are the problems. Anyway thanks for your help.
I got a new error message ""Syntax error (ExceptionInfo) compiling at (libpython_clj/metadata.clj:13:1).\nFailed to load library\n","
You can ask on Zulip. clojurians.zulipchat.com. Chris, the author is quite active on the data-science and libpython-clj-dev streams. Most of the community is there.
@zcaudate Thank you for your comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.