jupyter icon indicating copy to clipboard operation
jupyter copied to clipboard

`Wolfram Language 13.2` kernel's answers not correctly handled.

Open EmmanuelCharpentier opened this issue 2 years ago • 2 comments

I initially reported my problem in #223, but this was probably wrong : the issue has slightly different symptoms. I stumbled on #229, which led me to this stale branch which has one commit.

Initial symptoms :

- "normal" input (*e. g.* a Wolfram expression, such as `2+2`) is accepted, sent to the kernel, then an outout prompt is printed after a blank line, then a new input prompt *without output of the kernel's answer (with a new blank line again).

- a `Print` call is accepted, its result is printed in the output region *immediately below the input* and *without utput prompt*, then a blank line and a new input prompt are printed.

- Trying to `Print` the result of a command returning a graphics prints `- Graphics -` as above.

A transcript of the dialog region (i. e. without the prompts) was obtained via C-x C-f and is as follows :

Wolfram Language/Wolfram Engine Copyright 2019

Note: This Jupyter kernel was installed through the WolframScript install method. Accordingly, updates to a WolframLanguageForJupyter paclet will not affect this kernel.

 2+2

 

 Print[2+2]
4

the *Messages* buffer was saved after C-x b, containing :

Loading /etc/emacs/site-start.d/00debian.el (source)...done
Loading /etc/emacs/site-start.d/50asymptote.el (source)...done
Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell (native compiled elisp)...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell (native compiled elisp)...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50gnuserv.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...
Loading /usr/share/emacs/site-lisp/latex-cjk-common/cjk-enc.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done
Loading /etc/emacs/site-start.d/50latexmk.el (source)...done
Loading /etc/emacs/site-start.d/50lilypond-data.el (source)...done
Loading /etc/emacs/site-start.d/50noweb.el (source)...done
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...done
Loading ispell (native compiled elisp)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Starting wolframlanguage13.2 kernel process...done
Loading /home/charpent/.emacs.d/elpa/zmq-20230214.36/emacs-zmq (module)...done
Requesting kernel info...done
You can run the command ‘jupyter-run-repl’ with M-x j-ru-r RET
Requesting kernel info...done
Making completion list...
Saving file /home/charpent/Temporaire/Wolfram/SessionTranscipt.txt...
Directory ‘/home/charpent/Temporaire/Wolfram/’ does not exist; create? (y or n) y
Wrote /home/charpent/Temporaire/Wolfram/SessionTranscipt.txt
Quit
Jupyter REPL (SessionTranscipt.txt) still connected.  Kill it? (y or n) y
wolframlanguage13.2 kernel shutting down...done
finalizer failed: (cl-no-primary-method jupyter-kill-kernel #s(jupyter-kernel-process-manager (#<finalizer used>) jupyter--kernel-managers #s(jupyter-spec-kernel (#<finalizer> #<finalizer used>) ("wolframlanguage13.2" "/home/charpent/.local/share/jupyter/kernels/wolframlanguage13.2" :argv ["/usr/local/Wolfram/WolframEngine/13.2/Executables/WolframKernel" "-script" "/home/charpent/Dev/WolframLanguageForJupyter/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl" "{connection_file}" "ScriptInstall"] :env nil :display_name "Wolfram Language 13.2" :language "Wolfram Language" :interrupt_mode "signal" :metadata nil) #s(jupyter-session (:kernel_name "wolframlanguage13.2" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "bdf5bb1a-505f-4fad-84a1-4025e1a44d5b" :hb_port 37461 :stdin_port 45109 :control_port 38645 :shell_port 33119 :iopub_port 33027) "f1d1abfe-f4d1-4ebb-b55d-553b4c31d610" "bdf5bb1a-505f-4fad-84a1-4025e1a44d5b") #<process jupyter-kernel-wolframlanguage13.2>) nil))

I'll try to merge the commit oif the stale wolfram branch and report.

Any suggestion or debugging question is welcome.

EmmanuelCharpentier avatar May 03 '23 19:05 EmmanuelCharpentier

Adding the sole commit of the stale wolfram branch in a newbranch didn't change a thing...

HTH,

EmmanuelCharpentier avatar May 03 '23 19:05 EmmanuelCharpentier

One more data point : when called from an org source block, jupyter-Wolfram-Language does give an answer, which is by default formatted as an HTML image (!!!), but can be coaxed to give a text result.

Similarly, graphics can be obtained, bur are inline graphics. And I found no way to coax the kernel to give a reference to an external file. (and, BTW, Adding a caption does not work...).

LaTeX output does not work either...

See the enclosed example (Org source and HTML output).

HTH,

EssaiWolfram.zip

EmmanuelCharpentier avatar May 20 '23 20:05 EmmanuelCharpentier