Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ein: [info] Failed to save notebook #203

Open
4 tasks done
troisquatre opened this issue Mar 5, 2019 · 7 comments
Open
4 tasks done

ein: [info] Failed to save notebook #203

troisquatre opened this issue Mar 5, 2019 · 7 comments

Comments

@troisquatre
Copy link

troisquatre commented Mar 5, 2019

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
Copy link
Author

Whatever I could log:
Ein_debugLog.txt

@troisquatre
Copy link
Author

Any updates?

@millejoh
Copy link

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 millejoh/emacs-ipython-notebook#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
Copy link

yefeiyu commented Feb 12, 2020

as same as you

@yefeiyu
Copy link

yefeiyu commented Feb 12, 2020

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

@wickedjargon
Copy link

same issue here.

@wickedjargon
Copy link

C-x C-w works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants