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

ein: [info] Failed to save notebook #203

Open troisquatre opened 5 years ago

troisquatre commented 5 years ago

Check list

Description of the problem you have

I'm using Windows 10, Emacs 26.1, IPython 7.2.0, and ein 20190228.2008. C-x C-s gives the error: ein: [info] Failed to save notebook! . I'm able to save the files through the web interface.

As per #175, I tried changing the permissions of the files, but I can't chmod ug=rw files on Windows.

Steps to reproduce the problem

  1. Open Anaconda Prompt
  2. run activate py37
  3. From within the prompt, I launch Emacs
  4. C-x C-f <the notebook>
  5. C-c C-o and click open in the relevant directory
  6. Make changes and then C-x C-s

Expected output

File saved (I guess).

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

;; package (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) (not (gnutls-available-p)))) (proto (if no-ssl "http" "https"))) (when no-ssl (warn "\ Your version of Emacs does not support SSL connections, which is unsafe because it allows man-in-the-middle attacks. There are two things you can do about this warning:

  1. Install an Emacs version that does support SSL and be safe.
  2. Remove this warning from your init file so you won't see it again.")) ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) (when (< emacs-major-version 24) ;; For important compatibility libraries like cl-lib (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(package-initialize)

(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages (quote (package+ markdown-mode+ requirejs smartrep python-mode markdown-mode ipython-shell-send jupyter request-deferred tornado-template-mode ipython ein)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'ein) (require 'ein-notebook) (require 'ein-subpackages) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Your IPython configuration

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

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

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

Additional information (if any)

From #175: I tried: ein:byte-compile-ein. No change in results. ein:list-available-kernels 8888 doesn't exist in my installation. From #178: Attached is whatever I could log.

System info:

("EIN system info"
 :emacs-version "GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30"
 :emacs-bzr-version "07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea"
 :window-system w32
 :emacs-variant nil
 :os
 (:uname nil
     :lsb-release nil)
 :image-types
 (svg png gif tiff jpeg xpm xbm pbm)
 :image-types-available
 (svg png gif tiff jpeg xpm xbm pbm)
 :request
 (:backend curl)
 :ein
 (:version "0.15.0-20190222.1528"
       :source-dir "c:/Users/digby/AppData/Roaming/.emacs.d/elpa/ein-20190222.1528/")
 :lib
 ((:name "websocket"
     :path "~/.emacs.d/elpa/websocket-20180423.16/websocket.elc"
     :featurep t
     :version-var websocket-version
     :version "1.9")
  (:name "request"
     :path "~/.emacs.d/elpa/request-20181129.1138/request.elc"
     :featurep t
     :version-var request-version
     :version "0.3.0")
  (:name "auto-complete"
     :path "~/.emacs.d/elpa/auto-complete-20170125.245/auto-complete.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "popup"
     :path "~/.emacs.d/elpa/popup-20160709.1429/popup.elc"
     :featurep t
     :version-var popup-version
     :version "0.5.3")
  (:name "python"
     :path
     "c:/Users/digby/MyEmacsInstallation/share/emacs/26.1/lisp/progmodes/python.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "python-mode"
     :path "~/.emacs.d/elpa/python-mode-20181223.1933/python-mode.elc"
     :featurep nil
     :version-var nil
     :version nil)
  (:name "markdown-mode"
     :path "~/.emacs.d/elpa/markdown-mode-20181229.1430/markdown-mode.elc"
     :featurep t
     :version-var markdown-mode-version
     :version "2.4-dev")
  (:name "smartrep"
     :path "~/.emacs.d/elpa/smartrep-20150509.230/smartrep.elc"
     :featurep nil
     :version-var nil
     :version nil)))
troisquatre commented 5 years ago

Whatever I could log: Ein_debugLog.txt

troisquatre commented 5 years ago

Any updates?

millejoh commented 5 years ago

First, you should probably go over to https://github.com/millejoh/emacs-ipython-notebook and open an issue over there. This is the original, old, and no-longer-supported repository for ein.

Second, when you try to save it looks like Jupyter is generating a 500 response, which is kind of its way of shrugging arms and saying "I don't know." As mentioned in https://github.com/millejoh/emacs-ipython-notebook/issues/480, the current way to debug is:

  1. First issue M-x ein:dev-start-debug. Then reproduce the error.

  2. Higher level diagnostics appear in M-x ein:log-pop-to-all-buffer.

  3. Lower level diagnostics (the actual curl requests) appear in M-x ein:log-pop-to-request-buffer.

We might also be able to get better info if you run the jupyter server with the --debug option.

yefeiyu commented 4 years ago

as same as you

yefeiyu commented 4 years ago

I found the "File-Save" label is grey.

wickedjargon commented 2 years ago

same issue here.

wickedjargon commented 2 years ago

C-x C-w works.