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

Error (websocket): in callback `on-message': error: "Not an image: nil" #117

Closed taheris closed 11 years ago

taheris commented 11 years ago

Description of the problem you have

EIN works fine on my OSX laptop, but when I try to plot in Windows I get the following error:

Error (websocket): in callback `on-message': error: "Not an image: nil"

Steps to reproduce the problem

  1. Start a new notebook server
  2. Execute any plot. e.g.:
from pylab import plot, randn
def plot_normal():
    return plot(randn(1000), randn(1000), 'o', alpha=0.3)
plot_normal()

Expected output

An inline image.

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

(setq ein:use-auto-complete t)
(setq ein:use-smartrep t)

Your IPython configuration

  1. What is your IPython version? (run ipython --version):

0.13.2

  1. How do you start IPython? (e.g., ipython notebook --port 9999):

ipython notebook --pylab inline

  1. What is your IPython notebook port number or URL?:

8888

Additional information (if any)

System info:

("EIN system info"
 :emacs-version "GNU Emacs 24.3.1 (i386-mingw-nt6.2.9200)
 of 2013-03-17 on MARVIN"
 :emacs-bzr-version nil
 :window-system w32
 :emacs-variant nil
 :os
 (:uname "MINGW32_NT-6.2 TAHERIS 1.0.12(0.46/3/2) 2011-07-20 17:52 i686 unknown
"
         :lsb-release nil)
 :image-types
 (png gif tiff jpeg xpm xbm pbm)
 :image-types-available
 (xpm xbm pbm)
 :request
 (:backend curl)
 :ein
 (:version "0.2.1alpha2"
           :source-dir "c:/Users/shaun/.emacs.d/elpa/ein-20130611.1651/")
 :lib
 ((:name "websocket"
         :path "~/.emacs.d/elpa/websocket-20130508.2229/websocket.elc"
         :featurep t
         :version-var websocket-version
         :version "1.0")
  (:name "request"
         :path "~/.emacs.d/elpa/request-20130526.1915/request.elc"
         :featurep t
         :version-var request-version
         :version "0.2.0")
  (:name "auto-complete"
         :path "~/.emacs.d/elpa/auto-complete-20130503.2013/auto-complete.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "auto-complete"
         :path "~/.emacs.d/elpa/auto-complete-20130503.2013/auto-complete.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "popup"
         :path "~/.emacs.d/elpa/popup-20130324.1305/popup.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "python"
         :path "~/programs/emacs/lisp/progmodes/python.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "python-mode"
         :path "~/.emacs.d/elpa/python-mode-6.0.10/python-mode.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "markdown-mode"
         :path "~/.emacs.d/elpa/markdown-mode-20130611.1046/markdown-mode.elc"
         :featurep nil
         :version-var nil
         :version nil)
  (:name "smartrep"
         :path "~/.emacs.d/elpa/smartrep-20130312.1839/smartrep.elc"
         :featurep nil
         :version-var nil
         :version nil)))
tkf commented 11 years ago

Looking at your system info here:

 :image-types-available
 (xpm xbm pbm)

It looks like your Emacs does not support png, jpeg and svg. I guess you can't open image file in Emacs and see it. Get Emacs with image support if you want to use inline images.

But EIN should report it in more informative way. So thanks for your report!

taheris commented 11 years ago

Thanks, that was indeed the issue.

After adding zlib1.dll, jpeg62.dll, giflib4.dll and libpng14-14.dll to my emacs/bin directory, inline images are now working fine.

tkf commented 11 years ago

Good. I will point to this issue for Windows user from EIN manual. How did you find these libraries? If you read some webpages to get it working, please paste some links here.

taheris commented 11 years ago

As explained in this post, I got the libraries from the GnuWin32 and Gnome projects.

tkf commented 11 years ago

Thank you!