-
Notifications
You must be signed in to change notification settings - Fork 51
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
Url encoding error gives a 404 for ein:notebooklist-open #8
Comments
Thanks for the report. It looks like your Emacs encoded URL before sending it somehow. In my IPython server log I've never seen Could you try this and see if you can get JSON and you have similar log message in the terminal? (url-retrieve "http://127.0.0.1:8888/notebooks?_=1341211357"
(lambda (&rest ignore) (pop-to-buffer (current-buffer)))) BTW, what is your OS? I don't know it is relevant, but just checking. |
That snippet worked fine, I got the headers and expected JSON in the buffer. I'm on Ubuntu and the emacs-snapshot comes from a PPA |
Could you paste the result of the following also? An easiest way to do it is type (url-generic-parse-url "http://127.0.0.1:8888/notebooks?_=1341211357") In my Emacs, I've got: [cl-struct-url "http" nil nil "127.0.0.1" 8888 "/notebooks?_=1341211357" nil nil t nil t] |
Exactly the same for me: [cl-struct-url "http" nil nil "127.0.0.1" 8888 "/notebooks?_=1341211357" nil nil t nil t] |
That's very strange... Can you execute |
Here's everything:
Perhaps my emacs is loading a different version of the library that does the http requesting? |
Thanks for trying. From the log, it looks like EIN does its job. I have no idea why the URL is encoded. Did you try ein:notebooklist-open several times repeatedly (Just in case. Because it fails sometimes before succeeds)? I think the library (url.el) is fine. I am using emacs-snapshot from PPA in Ubuntu 10.10 and 11.10, so I think your Emacs environment is very close to mine. But I've never seen that URL encoding failure. I do get 404 sometimes but I can connect to the server after retrying several times (http://tkf.github.com/emacs-ipython-notebook/#url-retrieve). I think the fix in long-run is to add another backend for querying other than url-retrieve, such as wget or curl. But it will take sometime to implement. |
Yes, very curious! I tried multiple times as you suggested (both with M-x and in the scratch buffer) and it's the same every time. I will try and do the manual install or install it with el-get. I also tried it with the built in emacs 23.3.1 and I got the following, now sure if it's relevant or not:
|
Just to clarify, you always got encoding error in the IPython log, right? I think it should be possible to fix the problem because directly invoking url-retrieve has no problem, but I have no idea now. Also in my Emacs 23.3.1 it just works. Really strange. If |
I think I am experiencing the same problem (Emacs 23.4.1). Here is the output in
Note that running |
Running zeroein.py is equivalent to BTW, I found 4294967296 only in websocket.el under zeroein repository. What happens when you do |
I think you've found the source of the problem. Running
|
My elisp is very weak, but I don't see how the function |
Could you report the problem in websocket.el's issue tracker? Strangely, I can load websocket.el even though my most-positive-fixnum is same as yours (536870911). |
Don't worry about the report. I found a related problem so I just posted it in the websocket.el tracker (ahyatt/emacs-websocket#18). If you can add some more details, please do it. |
@Boothead If you are still interested in trying EIN in Emacs 24, probably the following code helps you: (defadvice ein:url-no-cache
(around ein:url-no-cache-no (url) activate)
"Do not use jQuery-like caching workaround."
(setq ad-return-value url)) I use jQuery-like way to disable caching because EIN's core is simple translation of browser based frontend. But from reading url.el's manual, there is no need to do that unless you have |
@tkf Sorry for the long delay - I only just noticed this reply. The defadvice snippet you gave here worked fine for me. Thanks a lot! |
Don't worry. I am glad the notification was not lost :) So, I guess it's better to remove |
This should be fixed by #95. |
#95 is merged. Check the master. |
In emacs using
I get this:
The terminal running
ipython notebook
reportsWARNING:root:404 GET /notebooks%3f_%3d1341211357 (127.0.0.1) 0.43ms
Interestingly if I decode the url and go to
http://127.0.0.1:8888/notebooks?_=1341211357
in my browser I get the json response that I assume ein is expecting:[{"name":"test","notebook_id":"1c7fc74f-4037-4f47-823e-ef6fbea4d5c9"}]
emacs version: GNU Emacs 24.1.50.1
ipython version: 0.13.dev
The text was updated successfully, but these errors were encountered: