tkf / emacs-ipython-notebook

IPython notebook client in Emacs
tkf.github.com/emacs-ipython-notebook/
GNU General Public License v3.0
548 stars 51 forks source link

(websocket): in callback `on-close': Wrong type argument: arrayp, nil #149

Closed cthorey closed 10 years ago

cthorey commented 10 years ago

Check list

I can start the notebook but when it opens, I got this error with

Error (websocket): in callback on-open': Cannot send message to a closed websocket: cl-struct-websocket-frame, text, "{\"header\":{\"msg_id\":\"32f22d3b-dca1-492f-afc4-1c7470366eb1\", \"username\":\"username\", \"session\":\"4722f4f4-f027-4ce2-be93-14ac8af3e3b8\", \"msg_type\":\"execute_request\"}, \"metadata\":{}, \"content\":{\"code\":\"__import__('sys').stdout.write(__import__('os').getcwd())\", \"silent\":true, \"user_variables\":[], \"user_expressions\":{}, \"allow_stdin\":false}, \"parent_header\":{}}", nil, t Error (websocket): in callbackon-open': Wrong type argument: arrayp, nil

Each time a compile a cell, i got the same error.

In ipython, i got an error as well :

2014-06-25 11:06:37.471 [NotebookApp] WARNING | Cross Origin WebSocket Attempt. 2014-06-25 11:06:37.471 [tornado.application] ERROR | Uncaught exception in /kernels/587835ea-d394-4367-bdb8-63c22e5511c2/shell

Steps to reproduce the problem

  1. ein:notebooklist-open
  2. open a notebook
  3. "Error (websocket): in callback `on-close': Wrong type argument: arrayp, nil"

    Expected output

Run the cell in the notebook

Your EIN configuration (in .emacs.d/init.el or somewhere else)

Same problem with zeroein.el ( is not coming from the configuration)

Your IPython configuration

  1. What is your IPython version? (run ipython --version):1.2.1
  2. How do you start IPython? (e.g., ipython notebook --port 9999): ipython notebook
  3. What is your IPython notebook port number or URL?: 8888

    Additional information (if any)

Try with different port, no improvment

System info:

("EIN system info"
 :emacs-version
 "GNU Emacs 24.3.1 (x86_64-apple-darwin12.5.0, NS apple-appkit-1187.40)
 of 2014-02-08 on teneight-slave.macports.org"
 :emacs-bzr-version nil
 :window-system ns
 :emacs-variant nil
 :os
 (:uname
  "Darwin pss-38.step.univ-paris-diderot.fr 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
"
  :lsb-release nil)
 :image-types
 (png gif tiff jpeg xpm xbm pbm)
 :image-types-available
 (png gif tiff jpeg xpm xbm pbm)
 :request
 (:backend curl)
 :ein
 (:version "0.2.1alpha2.d62dc59-dirty"
           :source-dir "/Users/thorey/.emacs.d/el-get/ein/lisp/")
 :lib
 ((:name "websocket"
         :path "~/.emacs.d/elpa/websocket-20140104.1438/websocket.elc"
         :featurep t
         :version-var websocket-version
         :version "1.1")
  (:name "request"
         :path "~/.emacs.d/el-get/request/request.elc"
         :featurep t
         :version-var request-version
         :version "0.2.0")
  (:name "auto-complete"
         :path "~/.emacs.d/elpa/auto-complete-20140618.2217/auto-complete.elc"
         :featurep t
         :version-var nil
         :version nil)
  (:name "mumamo"
         :path "~/.emacs.d/el-get/nxhtml/util/mumamo.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "auto-complete"
         :path "~/.emacs.d/elpa/auto-complete-20140618.2217/auto-complete.elc"
         :featurep t
         :version-var nil
         :version nil)
  (:name "popup"
         :path "~/.emacs.d/elpa/popup-20140207.1702/popup.elc"
         :featurep t
         :version-var popup-version
         :version "0.5.0")
  (:name "fuzzy"
         :path "~/.emacs.d/elpa/fuzzy-20131025.2343/fuzzy.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "python"
         :path "/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/progmodes/python.elc"
         :featurep t
         :version-var nil
         :version nil)
  (:name "markdown-mode"
         :path "~/.emacs.d/el-get/markdown-mode/markdown-mode.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "helm"
         :path "~/.emacs.d/el-get/helm/helm.el"
         :featurep t
         :version-var nil
         :version nil)))
gcr commented 10 years ago

There are a few other threads about this issue. Here's one quick fix that requires a small patch to ipython: http://stackoverflow.com/questions/22202182/error-on-websocket-when-try-to-use-ipython-notebook-in-emacs

cthorey commented 10 years ago

Thanks, the workaround works indeed. I close the issue