nnicandro / emacs-zmq

Emacs bindings to ØMQ
GNU General Public License v2.0
48 stars 17 forks source link

Keyword argument :coding-system not one of (:name :buffer :command :coding :noquery :stop :connection-type :filter :sentinel :stderr :file-handler) #21

Closed benneti closed 1 year ago

benneti commented 4 years ago

Hi,

Traceback:

Debugger entered--Lisp error: (error "Keyword argument :coding-system not one of (:name :buffer :command :coding :noquery :stop :connection-type :filter :sentinel :stderr :file-handler)")
  signal(error ("Keyword argument :coding-system not one of (:name :buffer :command :coding :noquery :stop :connection-type :filter :sentinel :stderr :file-handler)"))
  error("Keyword argument %s not one of (:name :buffer :command :coding :noquery :stop :connection-type :filter :sentinel :stderr :file-handler)" :coding-system)
  make-process--with-editor-process-filter(#f(advice-wrapper :filter-args #<subr make-process> explain--wrap-make-process-sentinel-filter-callback) :name "zmq" :buffer #<buffer  *zmq*-762995> :noquery t :connection-type pipe :coding-system no-conversion :filter zmq--subprocess-filter :sentinel zmq--subprocess-sentinel :stderr #<process zmq stderr> :command ("/usr/bin/emacs-26.3" "-Q" "-batch" "-L" "/home/benneti/.emacs.d/.local/straight/build/zmq/" "-l" "/home/benneti/.emacs.d/.local/straight/build/zmq/zmq.elc" "--eval" "(zmq--init-subprocess nil)"))
  apply(make-process--with-editor-process-filter #f(advice-wrapper :filter-args #<subr make-process> explain--wrap-make-process-sentinel-filter-callback) (:name "zmq" :buffer #<buffer  *zmq*-762995> :noquery t :connection-type pipe :coding-system no-conversion :filter zmq--subprocess-filter :sentinel zmq--subprocess-sentinel :stderr #<process zmq stderr> :command ("/usr/bin/emacs-26.3" "-Q" "-batch" "-L" "/home/benneti/.emacs.d/.local/straight/build/zmq/" "-l" "/home/benneti/.emacs.d/.local/straight/build/zmq/zmq.elc" "--eval" "(zmq--init-subprocess nil)")))
  make-process(:name "zmq" :buffer #<buffer  *zmq*-762995> :noquery t :connection-type pipe :coding-system no-conversion :filter zmq--subprocess-filter :sentinel zmq--subprocess-sentinel :stderr #<process zmq stderr> :command ("/usr/bin/emacs-26.3" "-Q" "-batch" "-L" "/home/benneti/.emacs.d/.local/straight/build/zmq/" "-l" "/home/benneti/.emacs.d/.local/straight/build/zmq/zmq.elc" "--eval" "(zmq--init-subprocess nil)"))
  zmq-start-process((lambda (ctx) (push "/home/benneti/.emacs.d/.local/straight/build/jupyter/" load-path) (require (quote jupyter-ioloop)) (setq jupyter-ioloop-poller (zmq-poller)) (setq jupyter-ioloop-stdin (let ((sock (zmq-socket ctx zmq-PAIR))) (prog1 sock (zmq-connect sock (format "tcp://127.0.0.1:%s" 56338))))) (zmq-poller-add jupyter-ioloop-poller jupyter-ioloop-stdin zmq-POLLIN) (let (events) (condition-case nil (progn (setq jupyter-channel-ioloop-session (jupyter-session :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb")) (require (quote jupyter-channel-ioloop)) (require (quote jupyter-zmq-channel-ioloop)) (push (quote jupyter-zmq-channel-ioloop--recv-messages) jupyter-ioloop-post-hook) (cl-loop for channel in (quote (:shell :stdin :iopub)) unless (object-assoc channel :type jupyter-channel-ioloop-channels) do (push (jupyter-zmq-channel :session jupyter-channel-ioloop-session :type channel) jupyter-channel-ioloop-channels)) (setq jupyter-ioloop-pre-hook (mapcar (lambda ... ...) (append jupyter-ioloop-pre-hook ...))) (zmq-prin1 (quote (start))) (let ((on-stdin ...)) (while t (run-hooks ...) (setq events ...) (let ... ...) (run-hook-with-args ... events)))) (quit (mapc (function jupyter-stop-channel) jupyter-channel-ioloop-channels) (zmq-prin1 (quote (quit))))))) :filter #f(compiled-function (event) #<bytecode 0x28e32d5>) :buffer nil)
  #f(compiled-function (arg1 arg2 &rest rest) #<bytecode 0x28dad55>)(#<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm> :buffer nil)
  apply(#f(compiled-function (arg1 arg2 &rest rest) #<bytecode 0x28dad55>) (#<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm> :buffer nil))
  #f(compiled-function (&rest cnm-args) #<bytecode 0x2856d45>)(#<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm> :buffer nil)
  #f(compiled-function (arg1 arg2 arg3 arg4 &rest rest) "Start IOLOOP, using SESSION to set the `jupyter-channel-ioloop-session'.\nAdd setup forms to IOLOOP that will initialize the\n`jupyter-channel-ioloop-session' variable to a `jupyter-session'\nbased on SESSION's id and key.  Also add\n`jupyter-ioloop-recv-messages' to `jupyter-ioloop-post-hook'.  In\naddition add the events send, start-channel, and stop-channel\nthat the parent Emacs process can send to the IOLOOP.  See\n`jupyter-channel-ioloop-add-send-event',\n`jupyter-channel-ioloop-add-start-channel-event', and\n`jupyter-ioloop-add-stop-channel-event'.\n\nAfter doing the above initialization, start the IOLOOP.  OBJ and\nBUFFER have the same meaning as in the method definition for\n`jupyter-ioloop'." #<bytecode 0x2450f39>)(#f(compiled-function (&rest cnm-args) #<bytecode 0x2856d45>) #<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #s(jupyter-session :conn-info (:kernel_name "julia-1.4" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb" :hb_port 38787 :stdin_port 42793 :control_port 37905 :shell_port 36795 :iopub_port 46249) :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb") #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>)
  apply(#f(compiled-function (arg1 arg2 arg3 arg4 &rest rest) "Start IOLOOP, using SESSION to set the `jupyter-channel-ioloop-session'.\nAdd setup forms to IOLOOP that will initialize the\n`jupyter-channel-ioloop-session' variable to a `jupyter-session'\nbased on SESSION's id and key.  Also add\n`jupyter-ioloop-recv-messages' to `jupyter-ioloop-post-hook'.  In\naddition add the events send, start-channel, and stop-channel\nthat the parent Emacs process can send to the IOLOOP.  See\n`jupyter-channel-ioloop-add-send-event',\n`jupyter-channel-ioloop-add-start-channel-event', and\n`jupyter-ioloop-add-stop-channel-event'.\n\nAfter doing the above initialization, start the IOLOOP.  OBJ and\nBUFFER have the same meaning as in the method definition for\n`jupyter-ioloop'." #<bytecode 0x2450f39>) #f(compiled-function (&rest cnm-args) #<bytecode 0x2856d45>) (#<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #s(jupyter-session :conn-info (:kernel_name "julia-1.4" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb" :hb_port 38787 :stdin_port 42793 :control_port 37905 :shell_port 36795 :iopub_port 46249) :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb") #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>))
  #f(compiled-function (&rest args) #<bytecode 0x2856d29>)(#<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #s(jupyter-session :conn-info (:kernel_name "julia-1.4" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb" :hb_port 38787 :stdin_port 42793 :control_port 37905 :shell_port 36795 :iopub_port 46249) :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb") #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>)
  apply(#f(compiled-function (&rest args) #<bytecode 0x2856d29>) #<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> (#s(jupyter-session :conn-info (:kernel_name "julia-1.4" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb" :hb_port 38787 :stdin_port 42793 :control_port 37905 :shell_port 36795 :iopub_port 46249) :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb") #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>))
  #f(compiled-function (arg &rest args) #<bytecode 0x28451e9>)(#<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #s(jupyter-session :conn-info (:kernel_name "julia-1.4" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb" :hb_port 38787 :stdin_port 42793 :control_port 37905 :shell_port 36795 :iopub_port 46249) :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb") #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>)
  apply(#f(compiled-function (arg &rest args) #<bytecode 0x28451e9>) #<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #s(jupyter-session :conn-info (:kernel_name "julia-1.4" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb" :hb_port 38787 :stdin_port 42793 :control_port 37905 :shell_port 36795 :iopub_port 46249) :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb") #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>)
  jupyter-ioloop-start(#<jupyter-zmq-channel-ioloop jupyter-zmq-channel-ioloop> #s(jupyter-session :conn-info (:kernel_name "julia-1.4" :transport "tcp" :ip "127.0.0.1" :signature_scheme "hmac-sha256" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb" :hb_port 38787 :stdin_port 42793 :control_port 37905 :shell_port 36795 :iopub_port 46249) :id "ebf1afbe-0e31-479b-8f7d-fd3b8c9ed710" :key "ee95da1a-bc7f-4c6d-9561-356581994cdb") #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>)
  #f(compiled-function (comm) #<bytecode 0x3dfa7d1>)(#<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>)
  apply(#f(compiled-function (comm) #<bytecode 0x3dfa7d1>) #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm> nil)
  jupyter-comm-start(#<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm>)
  #f(compiled-function (comm obj) #<bytecode 0x3ec474d>)(#<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm> #<jupyter-org-client jupyter-org-client>)
  apply(#f(compiled-function (comm obj) #<bytecode 0x3ec474d>) #<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm> #<jupyter-org-client jupyter-org-client>)
  jupyter-comm-add-handler(#<jupyter-channel-ioloop-comm jupyter-channel-ioloop-comm> #<jupyter-org-client jupyter-org-client>)
  #f(compiled-function (client) #<bytecode 0x3efc955>)(#<jupyter-org-client jupyter-org-client>)
  apply(#f(compiled-function (client) #<bytecode 0x3efc955>) #<jupyter-org-client jupyter-org-client> nil)
  jupyter-start-channels(#<jupyter-org-client jupyter-org-client>)
  jupyter-start-new-kernel("julia-1.4" jupyter-org-client)
  jupyter-run-repl("julia-1.4" nil nil jupyter-org-client)
  (progn (jupyter-run-repl kernel nil nil (quote jupyter-org-client)))
  (closure (cl-struct-org-babel-jupyter-server-session-tags cl-struct-org-babel-jupyter-remote-session-tags cl-struct-org-babel-jupyter-session-tags t) (_session kernel) "Call `jupyter-run-repl', passing KERNEL as argument." (progn (jupyter-run-repl kernel nil nil (quote jupyter-org-client))))(#s(org-babel-jupyter-session :name "jjsd") "julia-1.4")
  apply((closure (cl-struct-org-babel-jupyter-server-session-tags cl-struct-org-babel-jupyter-remote-session-tags cl-struct-org-babel-jupyter-session-tags t) (_session kernel) "Call `jupyter-run-repl', passing KERNEL as argument." (progn (jupyter-run-repl kernel nil nil (quote jupyter-org-client)))) (#s(org-babel-jupyter-session :name "jjsd") "julia-1.4"))
  #f(compiled-function (&rest cnm-args) #<bytecode 0x15bda9d>)()
  funcall(#f(compiled-function (&rest cnm-args) #<bytecode 0x15bda9d>))
  (let ((client (funcall cl--cnm))) (prog1 client (jupyter-set client (quote jupyter-include-other-output) nil) (save-current-buffer (set-buffer (eieio-oref client (quote buffer))) (let ((inhibit-read-only t)) (prog1 (progn (let (...) (if ... ...))) (let ((win ...)) (if win (progn ...))))))))
  (progn (let ((client (funcall cl--cnm))) (prog1 client (jupyter-set client (quote jupyter-include-other-output) nil) (save-current-buffer (set-buffer (eieio-oref client (quote buffer))) (let ((inhibit-read-only t)) (prog1 (progn (let ... ...)) (let (...) (if win ...))))))))
  (closure (cl-struct-org-babel-jupyter-server-session-tags cl-struct-org-babel-jupyter-remote-session-tags cl-struct-org-babel-jupyter-session-tags t) (cl--cnm session _kernel) "Rename the returned client's REPL buffer to include SESSION's name.\nAlso set `jupyter-include-other-output' to nil for the session so\nthat output produced by other clients do not get handled by the\nclient." (progn (let ((client (funcall cl--cnm))) (prog1 client (jupyter-set client (quote jupyter-include-other-output) nil) (save-current-buffer (set-buffer (eieio-oref client (quote buffer))) (let ((inhibit-read-only t)) (prog1 (progn ...) (let ... ...))))))))(#f(compiled-function (&rest cnm-args) #<bytecode 0x15bda9d>) #s(org-babel-jupyter-session :name "jjsd") "julia-1.4")
  apply((closure (cl-struct-org-babel-jupyter-server-session-tags cl-struct-org-babel-jupyter-remote-session-tags cl-struct-org-babel-jupyter-session-tags t) (cl--cnm session _kernel) "Rename the returned client's REPL buffer to include SESSION's name.\nAlso set `jupyter-include-other-output' to nil for the session so\nthat output produced by other clients do not get handled by the\nclient." (progn (let ((client (funcall cl--cnm))) (prog1 client (jupyter-set client (quote jupyter-include-other-output) nil) (save-current-buffer (set-buffer (eieio-oref client ...)) (let (...) (prog1 ... ...))))))) #f(compiled-function (&rest cnm-args) #<bytecode 0x15bda9d>) (#s(org-babel-jupyter-session :name "jjsd") "julia-1.4"))
  #f(compiled-function (&rest args) #<bytecode 0x1627455>)(#s(org-babel-jupyter-session :name "jjsd") "julia-1.4")
  apply(#f(compiled-function (&rest args) #<bytecode 0x1627455>) #s(org-babel-jupyter-session :name "jjsd") "julia-1.4")
  org-babel-jupyter-initiate-client(#s(org-babel-jupyter-session :name "jjsd") "julia-1.4")
  (setq client (org-babel-jupyter-initiate-client (org-babel-jupyter-parse-session session) kernel))
  (if client nil (setq client (org-babel-jupyter-initiate-client (org-babel-jupyter-parse-session session) kernel)) (puthash key client org-babel-jupyter-session-clients) (save-current-buffer (set-buffer (eieio-oref client (quote buffer))) (let ((inhibit-read-only t)) (prog1 (progn (let ((forget-client ...)) (add-hook (quote kill-buffer-hook) forget-client nil t))) (let ((win (get-buffer-window))) (if win (progn (set-window-point win ...))))))))
  (let* ((kernel (alist-get :kernel params)) (key (org-babel-jupyter-session-key params)) (client (gethash key org-babel-jupyter-session-clients))) (if client nil (setq client (org-babel-jupyter-initiate-client (org-babel-jupyter-parse-session session) kernel)) (puthash key client org-babel-jupyter-session-clients) (save-current-buffer (set-buffer (eieio-oref client (quote buffer))) (let ((inhibit-read-only t)) (prog1 (progn (let (...) (add-hook ... forget-client nil t))) (let ((win ...)) (if win (progn ...))))))) (eieio-oref client (quote buffer)))
  org-babel-jupyter-initiate-session-by-key("jjsd" ((:colname-names) (:rowname-names) (:result-params "raw" "silent") (:result-type . value) (:results . "raw silent") (:exports . "both") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:kernel . "julia-1.4") (:async . "yes") (:eval . "no-export") (:session . "jjsd")))
  (if (equal session "none") (error "Need a session to run") (org-babel-jupyter-initiate-session-by-key session params))
  org-babel-jupyter-initiate-session("jjsd" ((:colname-names) (:rowname-names) (:result-params "raw" "silent") (:result-type . value) (:results . "raw silent") (:exports . "both") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:kernel . "julia-1.4") (:async . "yes") (:eval . "no-export") (:session . "jjsd")))
  (buffer-local-value (quote jupyter-current-client) (org-babel-jupyter-initiate-session (alist-get :session params) params))
  (let* ((org-babel-jupyter-current-src-block-params params) (jupyter-current-client (buffer-local-value (quote jupyter-current-client) (org-babel-jupyter-initiate-session (alist-get :session params) params))) (kernel-lang (jupyter-kernel-language jupyter-current-client)) (vars (org-babel-variable-assignments:jupyter params kernel-lang)) (code (org-babel-expand-body:jupyter body params vars kernel-lang)) (result-params (assq :result-params params)) (async-p (or (equal (alist-get :async params) "yes") (plist-member params :async))) (req (jupyter-send-execute-request jupyter-current-client :code code))) (if (member "replace" (assq :result-params params)) (progn (org-babel-jupyter-cleanup-file-links))) (if (and (member "file" result-params) (or async-p (not (or (member "link" result-params) (member "graphics" result-params))))) (progn (org-babel-jupyter--remove-file-param params))) (cond (async-p (let (--cl-sync-on-export--) (setq --cl-sync-on-export-- (function (lambda nil (progn ... ...)))) (if (and (boundp (quote org-export-current-backend)) org-export-current-backend) (progn (add-hook (quote org-babel-after-execute-hook) --cl-sync-on-export-- t t))) (if (progn (or (and ... t) (signal ... ...)) (aref req 13)) org-babel-jupyter-async-inline-results-pending-indicator (jupyter-org-pending-async-results req)))) (t (while (null (jupyter-wait-until-idle req jupyter-long-timeout))) (if (progn (or (and (memq ... cl-struct-jupyter-org-request-tags) t) (signal (quote wrong-type-argument) (list ... req))) (aref req 13)) (car (progn (or (and ... t) (signal ... ...)) (aref req 10))) (prog1 (jupyter-org-sync-results req) (nconc (alist-get :result-params params) (list "raw")))))))
  org-babel-execute:jupyter-julia("using LinearAlgebra\n\ncomm(A,B) = A*B - B*A\n\nusing SymPy\nimport Base.imag\nimport Base.real\nimag(x::Sym) = sympy.im(x)\nreal(x::Sym) = sympy.re(x)\nimport Base.adjoint\nadjoint(x::Sym) = conj(x)\n\nusing Plots\ntheme(:default)\npgfplotsx()\ndefault(tickfontsize=11, legendfontsize=11, guidefontsize=11, framestyle=:box)\ndefault(gridlinewidth=1)\ndefault(linewidth=2)\ndefault(tex_output_standalone = true)\npush!(PGFPlotsX.CUSTOM_PREAMBLE, raw\"\\usepackage{amsmath}\")\npush!(PGFPlotsX.CUSTOM_PREAMBLE, raw\"\\usepackage{physics}\")\npush!(PGFPlotsX.CUSTOM_PREAMBLE, raw\"\\usepackage{nicefrac}\")\n\nusing TikzPictures\nfunction tikzvec(v)\n  l = length(v)\n  @assert 2 <= l <=3\n  if l == 2\n    return \"({$(v[1])}, {$(v[2])})\"\n  elseif l == 3\n    # we need the minus sign here to get the right handed rotations\n    return \"({$(v[1])}, {$(v[3])}, {$(-v[2])})\"\n  end\nend\n\nusing LaTeXStrings\nusing Latexify\nfunction latex(key)\n  temp = replace(\"$key\", r\"([CSσ])([\\dd])_(\\d)([mp]*)\" => s\"\\1_{\\2,\\3\\4}\")\n  temp = replace(temp, r\"([AET])([\\d])\" => s\"\\1_{\\2}\")\n  temp = replace(temp, \"p\"=>\"+\")\n  temp = replace(temp, \"m\"=>\"-\")\n  temp = replace(temp, \"σ\"=>\"\\\\sigma\")\n  temp = replace(temp, \"C3v\"=>\"C_{3v}\")\n  temp = replace(temp, \"Td\"=>\"T_d\")\n  \"\\\\( $temp \\\\)\"\nend\nlatex(key::Sym) = sympy.latex(key)\n\nusing Unitful\nusing PhysicalConstants: CODATA2018\nCD18 = CODATA2018\n\nval(x::Number) = x\nval(x::Quantity) = x.val\n\nfunction createJoperators(j)\n  length = convert(Int, 2*j+1)\n  ms = j:-1:-j\n  Jplus = [(ms[i1]-ms[i2])==1 ? sqrt(j*(j+1)-ms[i2]*(ms[i2]+1)) : convert(typeof(j), 0)\n       for i1 in 1:length, i2 in 1:length]\n  Jminus = [(ms[i2]-ms[i1])==1 ? sqrt(j*(j+1)-ms[i2]*(ms[i2]-1)) : convert(typeof(j), 0)\n       for i1 in 1:length, i2 in 1:length]\n  Jx = (Jplus .+ Jminus)./2\n  Jy = (Jplus .- Jminus)./(2im)\n  Jz = diagm([ms[i] for i in 1:length])\n  (Jx, Jy, Jz, Jplus, Jminus)\nend\n\n# sakurai p. 528\nfunction sphericalharmonics(l::Int,m::Int;\n              θ=symbols(\"theta\",positive=true),φ=symbols(\"varphi\",positive=true))\n  @assert l >= 0\n  @assert l >= abs(m)\n  if m < 0\n    return (-1)^(-m) * conj(sphericalharmonics(l,-m; θ=θ, φ=φ))\n  end\n  norm = (-1)^m * sqrt((2*l+1)/(4*PI) * factorial(l-m)/Sym(factorial(l+m)))\n  x=symbols(\"x\")\n  pl = (-1)^l/(Sym(2^l)*factorial(l))*diff((1-x^2)^(l), x, l)\n  plm = (1-cos(θ)^2)^(m/Sym(2)) * subs(diff(pl, x, m), x=>cos(θ))\n  norm * exp(1im*m*φ) * plm\nend\n\nfunction clebschgordancoefficient((p, s), (q, t), (r, u); α=1, kys=nothing)\n  kys = kys==nothing ? keys(q) : kys\n  if α==0\n    return Sym(0)\n  elseif α==1\n    g = length(kys)\n    d_q = convert(Int64, tr(q[:E]))\n    d_p = convert(Int64, tr(p[:E]))\n    d_r = convert(Int64, tr(r[:E]))\n    dnm = Sym(0)\n    for j in 1:d_p, k in 1:d_q, l in 1:d_r\n      dnm = expand(sum(p[key][j,j]*q[key][k,k]*conj(r[key][l,l]) for key in kys),\n             complex=true)\n      if dnm != 0\n        return expand(sqrt(Sym(d_r)/Sym(g))*\n               sum(p[key][s,j]*q[key][t,k]*conj(r[key][u,l]) for key in kys)/\n               dnm,\n               complex=true)\n      end\n    end\n    @assert dnm != 0\n  else\n    @error α>1\n  end\nend\n\nfunction normalizedcgc((p, s), (q, t), (r, u); α=1)\n  d_q = convert(Int64, tr(q[:E]))\n  d_p = convert(Int64, tr(p[:E]))\n  d_r = convert(Int64, tr(r[:E]))\n  temp = [clebschgordancoefficient((p, j), (q, k), (r, u); α=α)\n      for j in 1:d_p, k in 1:d_q]\n  simplify.(expand.(temp[s,t]/(nm = norm(reshape(temp[:,:], d_q*d_p));\n                 nm == 0 ? 1 : nm), complex=true))\nend\n\nrotatevector_x(φ) = [one(φ) zero(φ) zero(φ);\n           zero(φ) cos(φ) -sin(φ);\n           zero(φ) sin(φ) cos(φ)]\nrotatevector_y(φ) = [cos(φ) zero(φ) sin(φ);\n           zero(φ) one(φ) zero(φ);\n           -sin(φ) zero(φ) cos(φ)]\nrotatevector_z(φ) = [cos(φ) -sin(φ) zero(φ);\n           sin(φ) cos(φ) zero(φ);\n           zero(φ) zero(φ) one(φ)]" ((:colname-names) (:rowname-names) (:result-params "raw" "silent") (:result-type . value) (:results . "raw silent") (:exports . "both") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:kernel . "julia-1.4") (:async . "yes") (:eval . "no-export") (:session . "jjsd")))
  org-babel-execute-src-block(nil ("jupyter-julia" "using LinearAlgebra\n\ncomm(A,B) = A*B - B*A\n\nusing SymPy\nimport Base.imag\nimport Base.real\nimag(x::Sym) = sympy.im(x)\nreal(x::Sym) = sympy.re(x)\nimport Base.adjoint\nadjoint(x::Sym) = conj(x)\n\nusing Plots\ntheme(:default)\npgfplotsx()\ndefault(tickfontsize=11, legendfontsize=11, guidefontsize=11, framestyle=:box)\ndefault(gridlinewidth=1)\ndefault(linewidth=2)\ndefault(tex_output_standalone = true)\npush!(PGFPlotsX.CUSTOM_PREAMBLE, raw\"\\usepackage{amsmath}\")\npush!(PGFPlotsX.CUSTOM_PREAMBLE, raw\"\\usepackage{physics}\")\npush!(PGFPlotsX.CUSTOM_PREAMBLE, raw\"\\usepackage{nicefrac}\")\n\nusing TikzPictures\nfunction tikzvec(v)\n  l = length(v)\n  @assert 2 <= l <=3\n  if l == 2\n    return \"({$(v[1])}, {$(v[2])})\"\n  elseif l == 3\n    # we need the minus sign here to get the right handed rotations\n    return \"({$(v[1])}, {$(v[3])}, {$(-v[2])})\"\n  end\nend\n\nusing LaTeXStrings\nusing Latexify\nfunction latex(key)\n  temp = replace(\"$key\", r\"([CSσ])([\\dd])_(\\d)([mp]*)\" => s\"\\1_{\\2,\\3\\4}\")\n  temp = replace(temp, r\"([AET])([\\d])\" => s\"\\1_{\\2}\")\n  temp = replace(temp, \"p\"=>\"+\")\n  temp = replace(temp, \"m\"=>\"-\")\n  temp = replace(temp, \"σ\"=>\"\\\\sigma\")\n  temp = replace(temp, \"C3v\"=>\"C_{3v}\")\n  temp = replace(temp, \"Td\"=>\"T_d\")\n  \"\\\\( $temp \\\\)\"\nend\nlatex(key::Sym) = sympy.latex(key)\n\nusing Unitful\nusing PhysicalConstants: CODATA2018\nCD18 = CODATA2018\n\nval(x::Number) = x\nval(x::Quantity) = x.val\n\nfunction createJoperators(j)\n  length = convert(Int, 2*j+1)\n  ms = j:-1:-j\n  Jplus = [(ms[i1]-ms[i2])==1 ? sqrt(j*(j+1)-ms[i2]*(ms[i2]+1)) : convert(typeof(j), 0)\n       for i1 in 1:length, i2 in 1:length]\n  Jminus = [(ms[i2]-ms[i1])==1 ? sqrt(j*(j+1)-ms[i2]*(ms[i2]-1)) : convert(typeof(j), 0)\n       for i1 in 1:length, i2 in 1:length]\n  Jx = (Jplus .+ Jminus)./2\n  Jy = (Jplus .- Jminus)./(2im)\n  Jz = diagm([ms[i] for i in 1:length])\n  (Jx, Jy, Jz, Jplus, Jminus)\nend\n\n# sakurai p. 528\nfunction sphericalharmonics(l::Int,m::Int;\n              θ=symbols(\"theta\",positive=true),φ=symbols(\"varphi\",positive=true))\n  @assert l >= 0\n  @assert l >= abs(m)\n  if m < 0\n    return (-1)^(-m) * conj(sphericalharmonics(l,-m; θ=θ, φ=φ))\n  end\n  norm = (-1)^m * sqrt((2*l+1)/(4*PI) * factorial(l-m)/Sym(factorial(l+m)))\n  x=symbols(\"x\")\n  pl = (-1)^l/(Sym(2^l)*factorial(l))*diff((1-x^2)^(l), x, l)\n  plm = (1-cos(θ)^2)^(m/Sym(2)) * subs(diff(pl, x, m), x=>cos(θ))\n  norm * exp(1im*m*φ) * plm\nend\n\nfunction clebschgordancoefficient((p, s), (q, t), (r, u); α=1, kys=nothing)\n  kys = kys==nothing ? keys(q) : kys\n  if α==0\n    return Sym(0)\n  elseif α==1\n    g = length(kys)\n    d_q = convert(Int64, tr(q[:E]))\n    d_p = convert(Int64, tr(p[:E]))\n    d_r = convert(Int64, tr(r[:E]))\n    dnm = Sym(0)\n    for j in 1:d_p, k in 1:d_q, l in 1:d_r\n      dnm = expand(sum(p[key][j,j]*q[key][k,k]*conj(r[key][l,l]) for key in kys),\n             complex=true)\n      if dnm != 0\n        return expand(sqrt(Sym(d_r)/Sym(g))*\n               sum(p[key][s,j]*q[key][t,k]*conj(r[key][u,l]) for key in kys)/\n               dnm,\n               complex=true)\n      end\n    end\n    @assert dnm != 0\n  else\n    @error α>1\n  end\nend\n\nfunction normalizedcgc((p, s), (q, t), (r, u); α=1)\n  d_q = convert(Int64, tr(q[:E]))\n  d_p = convert(Int64, tr(p[:E]))\n  d_r = convert(Int64, tr(r[:E]))\n  temp = [clebschgordancoefficient((p, j), (q, k), (r, u); α=α)\n      for j in 1:d_p, k in 1:d_q]\n  simplify.(expand.(temp[s,t]/(nm = norm(reshape(temp[:,:], d_q*d_p));\n                 nm == 0 ? 1 : nm), complex=true))\nend\n\nrotatevector_x(φ) = [one(φ) zero(φ) zero(φ);\n           zero(φ) cos(φ) -sin(φ);\n           zero(φ) sin(φ) cos(φ)]\nrotatevector_y(φ) = [cos(φ) zero(φ) sin(φ);\n           zero(φ) one(φ) zero(φ);\n           -sin(φ) zero(φ) cos(φ)]\nrotatevector_z(φ) = [cos(φ) -sin(φ) zero(φ);\n           sin(φ) cos(φ) zero(φ);\n           zero(φ) zero(φ) one(φ)]" ((:colname-names) (:rowname-names) (:result-params "silent" "raw") (:result-type . value) (:results . "silent raw") (:exports . "both") (:session . "jjsd") (:eval . "no-export") (:async . "yes") (:kernel . "julia-1.4") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no")) "" nil 361 "(ref:%s)"))
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)

This is fixed by replacing

                   ;; :coding-system 'no-conversion
                   :coding 'no-conversion

in zmq.el line 515. I would guess that the naming of the keyword arguments of make-process changed because until today it was working.

nnicandro commented 1 year ago

Thanks! Don't know where I got :coding-system from. Its been :coding since Emacs 26, when I started the project.