Open rhstanton opened 10 years ago
Pretty sure this is happening because requests to http://127.0.0.1:8888/notebooks now return an HTML page instead of JSON data.
The RESTful interface to ipython notebook seems to have changed and all commands need to be prefixed with "api" now (I think). E.g. to get list of notebooks call http://127.0.0.1:8888/api/notebooks.
So far I can get ein:notebooklist-open to work, but not an individual notebook (I need to track down where/how ein makes that call).
I don't use git much, but if I can figure out how to get ein working again with ipython 2.0 there might be hope for me figuring out how to do a pull request.
@millejoh That would be great if emacs could work with ipython 2. Right now, I have a hard time typing in ipython notebook.Thanks,
Finally found some documentation on the RESTful API. Looks like they no longer use notebook ID's and decouple notebooks from the kernel, instead using a session to manage communication. Or some such. It'll take some time for me to read and understand this, and probably even more to update the code. Maybe tkf will beat me to the punch and release a new version of ein. Otherwise I'll try to get in a pull request with the changes ASAP. Unfortunately the changes will probably break ein compatibility with versions of IPython previous to 2.0.0.
2.0 is now the stable version of IPython. Until EIN can be made compatible with the latest stable version of IPython, the installation instructions ought to make it very clear that a legacy version of IPython is required.
So, http://tkf.github.io/emacs-ipython-notebook/#requirements needs to be changed from "IPython 0.12 or higher" to "IPython 0.12 to 1.2.1".
On 4/29/2014 5:04 PM, lambda-seven wrote:
I ran into this version compatibility problem today. No comments since 19 days. Did anyone make any progress since that time or are you sticking with ipython <= 1.2? tkf can you confirm the source of the problem due to API change and are you planning adjustment changes to make ein work with new versions of notebook?
— Reply to this email directly or view it on GitHub https://github.com/tkf/emacs-ipython-notebook/issues/137#issuecomment-41738151.
The problem is indeed due to a change in the API, thanks to IPython now supporting notebook hierarchies.
The fork I made over at github https://github.com/millejoh/emacs-ipython-notebook is working for me using ipython 2.0.0, but I have heard from one other person that couldn't get it to work. Note that I don't have 100% functionality, but I do have enough working to open and edit workbooks. It has been a busy month at work, but I try to work on it as I can.
All I can say is, if you are feeling adventurous checkout a copy and when something breaks create an issue using information from ein:dev-bug-report-template.
John
What's the status of this problem? I'm still seeing it with ipython 2.1.
Same problems here. millejoh's fork seems to fix most problems (thanks!), but ein could use some love...
BTW millejoh's fork is at: https://github.com/millejoh/emacs-ipython-notebook (the link above drags ">is" into the URL)
Let us know if there is something we can help with, tk. This is an awesome tool...
Millejoh's fork works for me, I have new install of GNU Emacs 24.3.1 and Anaconda Python 64-bit release 2.0.1. With this combination, the IPython client at http://tkf.github.io/emacs-ipython-notebook/ doesn't work..
Ibid -- Millejoh's fork works for me.
Are there any known issues with Millejoh's fork?
A few minor annoyances with millejoh's fork:
Untitled06.ipynb
notebook to enter it.mv
the .ipynb file and refresh the notebook list.But other than these small issues, after installing Millehjoh's fork of EIN, IPython 2.2, and Tornado ≥4.x (having a recent version of Tornado is important to fixing the websocket issue), and after ensuring that websocket.el doesn't send the Origin
header (see this patch: https://github.com/ahyatt/emacs-websocket/commit/8c366e8f3d5662dba6e9a4c1369e096b7ad917b1 ), things are back to working quite smoothly.
I don't need to patch any Python packages and the only tweak is the websocket fix, which is in new versinos of websocket.el (I'm not sure if that fix is on ELPA/marmalade/... yet).
The hardest part is just making sure you have the correct dependencies. My worknig setup is:
I have the same problems except I am using IPython 2.2.0. I installed ein from MELPA and I have the following versions:
ein-20140317.1114
websocket-20140823.1756
Running
M-x ein:notebooklist-open
and entering port 8888 gives the error:
REQUEST [error] Error from parser ein:json-read: (json-readtable-error)
ein: [error] Error (parse-error) while opening notebook list at the server 8888.
IPython notebook runs without problems from the terminal:
nithyanndansmbp:~ XXX$ ipython notebook
2014-09-23 17:06:57.957 [NotebookApp] Using existing profile dir: u'/Users/XXX/.ipython/profile_default'
2014-09-23 17:06:57.962 [NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
2014-09-23 17:06:58.184 [NotebookApp] Serving notebooks from local directory: /Users/XXX
2014-09-23 17:06:58.184 [NotebookApp] 0 active kernels
2014-09-23 17:06:58.184 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2014-09-23 17:06:58.184 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
WARNING:tornado.access:404 GET /new (127.0.0.1) 0.39ms referer=None
Based on the discussion above a forked version seems to fix this but is not available yet on MELPA? Thanks!
You are correct - the version of ein in MELPA is based off tkf's main branch, which only supports IPython versions earlier than 2.0. If you want support for 2.0 or later you have to download my fork from github and add the lisp subdirectory to your load-path.
I am slowly working towards adding my fork to MELPA, but with a different name so people are clear that the different packages support different versions of the IPython notebook.
I don't have much free time, and am honestly quite lazy, but I will try to do this soon.
Give my github fork a try, it works well enough in my day to day use. If you find anything send me a note or create an issue.
Regards,
John Miller
On Sep 23, 2014, at 8:07 PM, nithyanandan notifications@github.com wrote:
I have the same problems except I am using IPython 2.2.0. I installed ein from MELPA and I have the following versions: ein-20140317.1114 websocket-20140823.1756 Running M-x ein:notebooklist-open and entering port 8888 gives the error: REQUEST [error] Error from parser ein:json-read: (json-readtable-error) ein: [error] Error (parse-error) while opening notebook list at the server 8888.
IPython notebook runs without problems from the terminal:
nithyanndansmbp:~ XXX$ ipython notebook 2014-09-23 17:06:57.957 [NotebookApp] Using existing profile dir: u'/Users/XXX/.ipython/profile_default' 2014-09-23 17:06:57.962 [NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js 2014-09-23 17:06:58.184 [NotebookApp] Serving notebooks from local directory: /Users/XXX 2014-09-23 17:06:58.184 [NotebookApp] 0 active kernels 2014-09-23 17:06:58.184 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/ 2014-09-23 17:06:58.184 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). WARNING:tornado.access:404 GET /new (127.0.0.1) 0.39ms referer=None Based on the discussion above a forked version seems fix this but is not available yet on MELPA? Thanks!
— Reply to this email directly or view it on GitHub.
Check list
*.elc
files from source directory of EIN and its dependencies did not solve the problem.Description of the problem you have
EIN isn't happy working with the latest development version of IPython (2.0.0-dev). When I tryn to execute ein:notebooklist-open, I get an error.
Steps to reproduce the problem
Expected output
Notebook list. Instead, I get the error
REQUEST [error] Error from parser ein:json-read: (json-readtable-error) ein: [error] Error (parse-error) while opening notebook list at the server 8888.
(This works fine with IPython 1.2)
Your EIN configuration (in .emacs.d/init.el or somewhere else)
Your IPython configuration
ipython --version
):2.0.0-dev
ipython notebook --port 9999
):ipython notebook
8888
Additional information (if any)
System info: