Unable to work with Clojupyter

Hello All,

I am learning Clojure, and I found clojupyter to be very helpful. But recently I am getting errors as shown. I use Mac M1 (Monterey 12.1)

[I 2022-01-25 10:21:54.017 LabApp] Build is up to date
[I 2022-01-25 10:21:57.063 ServerApp] Creating new notebook in
[I 2022-01-25 10:21:57.529 ServerApp] Kernel started: 271c0671-68c9-4ebc-b92d-9d8fe5b86837
[E 04:52:08.886 Clojupyter] c8r.messages -- Invalid message signature
[E 04:52:08.932 Clojupyter] c8r.util-actions --
                                        java.lang.Thread.run              Thread.java:  745
          java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  617
           java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1142
                                                         ...
                           clojure.core.async/thread-call/fn                async.clj:  443
                                     clojupyter.zmq/start/fn                  zmq.clj:  108
                                      clojure.core.async/>!!                async.clj:  143
     clojure.core.async.impl.channels.ManyToManyChannel/put!             channels.clj:  143
                    clojure.core.async.impl.channels/chan/fn             channels.clj:  300
                                      clojure.core/map/fn/fn                 core.clj: 2742
                                                         ...
clojupyter.util-actions/wrap-report-and-absorb-exceptions/fn         util_actions.clj:  239
                                          clojure.core/apply                 core.clj:  665
                                                         ...
                                        clojure.core/comp/fn                 core.clj: 2569
         clojupyter.kernel.core/wrap-skip-shutdown-tokens/fn                 core.clj:   83
                                        clojure.core/comp/fn                 core.clj: 2569
                                     clojure.core/partial/fn                 core.clj: 2624
                                                         ...
                 clojure.spec.test.alpha/spec-checking-fn/fn                alpha.clj:  142
                                                         ...
                       clojupyter.messages/fn/frames->jupmsg             messages.clj:  288
java.lang.Exception: Invalid message signature

[E 04:52:09.009 Clojupyter] c8r.util-actions --
                                        java.lang.Thread.run              Thread.java:  745
          java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  617
           java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1142
                                                         ...
                           clojure.core.async/thread-call/fn                async.clj:  443
                                     clojupyter.zmq/start/fn                  zmq.clj:  108
                                      clojure.core.async/>!!                async.clj:  143
     clojure.core.async.impl.channels.ManyToManyChannel/put!             channels.clj:  143
                    clojure.core.async.impl.channels/chan/fn             channels.clj:  300
                                      clojure.core/map/fn/fn                 core.clj: 2742
                                                         ...
clojupyter.util-actions/wrap-report-and-absorb-exceptions/fn         util_actions.clj:  239
                                          clojure.core/apply                 core.clj:  665
                                                         ...
                                        clojure.core/comp/fn                 core.clj: 2569
         clojupyter.kernel.core/wrap-skip-shutdown-tokens/fn                 core.clj:   83
                                        clojure.core/comp/fn                 core.clj: 2569
                                     clojure.core/partial/fn                 core.clj: 2624
                                                         ...
                 clojure.spec.test.alpha/spec-checking-fn/fn                alpha.clj:  142
                                                         ...
                       clojupyter.messages/fn/frames->jupmsg             messages.clj:  288
java.lang.Exception: Invalid message signature

Exception in thread "async-thread-macro-11" java.lang.AssertionError: Assert failed: handle-request - internal error (':shell_port' neq '')

It will be great if some one could tell me whats happening, and possible fix.

I solved it and have written a blog about it here Getting Clojupyter running | Karthikeyan A K’s blog

1 Like

To address a couple of points from your blog post, since it doesn’t seem to have a way to comment.

it would be great if clojure community is becomes more helpful in the future

Any community’s helpfulness is limited by the expertise of its people. In this case, your question is not really about Clojure or even Java but rather about Clojure being run in a Clojupyter notebook being run on an M1 machine. It’s very niche, so there are not a lot of people that could help here.

Regarding running Jupyter with Clojure in general. I find that most often Jupyter is used by data science communities, and there’s a whole such community that’s focused on working with Clojure. The thing is, AFAICT they don’t use Jupyter that much and prefer other tools, like for example GitHub - nextjournal/clerk: ⚡️ Moldable Live Programming for Clojure or https://pink-gorilla.github.io/. I’m not in a position to say why, but if you’re interested then you’re more than welcome to ask about that here on Clojuverse or on Zulip in the data-science stream. In particular, Profile - daslu - ClojureVerse should know about this.

2 Likes

Hi @mindaslab, thanks for the post!
And thanks for the important clarification, @p-himik, I believe you are right.

Indeed Clojupyter is not so active, at the moment.

Pink-Gorilla is very promising, but still work-in-progress. In addition to Clerk, another well-polished and friendly tool is Portal. The maintainers of these projects (and others) are extremely kind and helpful.

By the way, today we’ll have a community meeting with a few of the people creating visual tools around similar use cases. Maybe you’d like to join. A similar meeting took place a couple of months ago and may shed some light on the active projects in this field.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.