-
Notifications
You must be signed in to change notification settings - Fork 123
Tips
This seems to happen more commonly on Windows installations, and the exact cause is unclear but what seems to happening is that jupyter is not able to match the xsrf token curl puts into the header with the token jupyter is keeping locally. It maybe proxy related - see issue #464.
There are a few potential workarounds, in order of preference:
- Add ("--noproxy" "127.0.0.1") to
request-curl-arguments
per this comment. - Disable xsrf checking on the jupyter server by setting
c.NotebookApp.disable_check_xsrf = True
in your jupyter notebook configuration file.
Note method 2 is not recommended unless you are running jupyter locally and are not concerned about potential malicious attacks from unknown websites.
This happens most often when using curl as the request backend and self-signed certificates. Curl will refuse to handle unsigned certificates unless it is called with the --insecure. You can modify your .curlrc
file per #225, or customize the request-curl-options
variable in Emacs.
There also appears to be an incompatibility in OS X's OpenSSL implementation, so the following steps need to be taken enable compatible SSL support in Emacs under OS X:
- OpenSSL needs to be installed from either source/homebrew.
- The real version of openssl needs to take precedent over the crippled osx version.
- Emacs must be compiled with gnu-tls support.
- Be careful when Xcode is installed and performing an upgrade as the brew openssl may be 'supplanted' with the bogus version of Apple's openssl.
See issues and #226, #182, and #94 for more details.
Thanks to @maxgerlach for this suggestion. After opening a notebook, ein calls
pop-to-buffer
to display the newly created buffer. This unfortunately may not
be the behavior people want. One good solution for controlling this is to
install the Shackle package and add the
following to your init file:
;;;; let's use package Shackle to prevent ein notebook buffers to pop
;;;; up in the "other window"
(require 'shackle)
(setq shackle-rules '(("\\`\\*ein: .+?\\.ipynb\\*\\'" :regexp t :same t)))
(shackle-mode)
For a bit more discussion see https://github.com/millejoh/emacs-ipython-notebook/issues/75.
(custom-set-faces
'(mumamo-background-chunk-major
((((class color) (min-colors 88) (background dark)) nil))))
See also: https://github.com/tkf/zeroein/blob/master/zeroein.el
Other way to do it:
(setq mumamo-background-colors nil)
See also: Issue #60: With mumamo, background color changes · tkf/emacs-ipython-notebook (thanks to @rhstanton)
(setq python-saved-check-command nil)
See also: Issue #54: Problem with single quote in markdown cell · tkf/emacs-ipython-notebook (thanks to @rhstanton)
You can get "Invalid file-name" error if you have something like the following in your Emacs setting.
(add-hook 'python-mode-hook 'flymake-find-file-hook) ; or
(add-hook 'python-mode-hook 'flymake-mode)
This may solves your problem:
(add-hook 'python-mode-hook (lambda () (if (buffer-file-name)
(flymake-mode))))
See also: Issue #12: mumamo compatibility problems with emacs-for-python · tkf/emacs-ipython-notebook (thanks to @gabrielelanaro)