-
Notifications
You must be signed in to change notification settings - Fork 11
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
Doesn't seem to work with remote IPython Notebook server? #10
Comments
I am using SSH port forwarding to connect to remote ipython server on port Maxim Grechkin On Thu, Sep 26, 2013 at 8:57 AM, Aldanor [email protected] wrote:
|
I seem to be able to get JSON back in browser via req = urlopen("http://" + baseurl + "/notebooks") |
Looks like it's fixable, the problem is that your implementation doesn't handle proxies. So, in proxy = urllib2.ProxyHandler({})
opener = urllib2.build_opener(proxy)
req = opener.open('http://%s/notebooks/' % baseurl) ... which kinda seems to work :) |
On a side note, may I suggest saving the previous entered value of host/port instead of offering 127.0.0.1:888 as default every time? -- if someone uses a custom host/port (like I do), they would have to type it in manually every single time... |
I've added the code to save previous host/port value and proxy handling code. But I am still not sure if using proxy will work now, because it looks like websocket-client doesn't support proxy... |
Can't connect to a server using the following: 192.168.0.7:11111 I do have it password protected. |
Are you using proxy server? I don't think that would be expected to work Maxim Grechkin On Wed, Feb 12, 2014 at 6:31 PM, caoimhinp [email protected] wrote:
|
No. No proxy. |
Can you try connecting to it without https? Maxim Grechkin On Wed, Feb 12, 2014 at 6:53 PM, caoimhinp [email protected] wrote:
|
No joy. myurl.me:11111 |
What about those: Will you server accept http connections or you have set it up to work over Maxim Grechkin On Wed, Feb 12, 2014 at 6:58 PM, caoimhinp [email protected] wrote:
|
No, it won't accept http. I have it password protected and configured for https. |
OK, then of course there was no reason to try them. You can try to see if I am not sure if the plugin is even expected to work with HTTPS. I've never Patches to support HTTPS (if it is indeed HTTPS issue) will be of course Maxim Grechkin On Wed, Feb 12, 2014 at 7:02 PM, caoimhinp [email protected] wrote:
|
No worries. I just thought I'd post my issue to keep this issue alive. I thought I'd try those strings simply because I don't know how you're handling them on the other side. I noted that it supported passwords after seeing the z-m-k contrib acknowledgement. I assumed it supported https since using passwords in the clear is not such a useful function. ;) ... I just checked and it looks like you're forcing http in the url parsing. I'll see what I can do ... |
Sounds great! I think the main question will be the support for HTTPS in websocket-client Maxim Grechkin On Wed, Feb 12, 2014 at 7:17 PM, caoimhinp [email protected] wrote:
|
Thought I'd give it a quick look. Can't spend too much time on it tonight. I thought I'd first try just changing the hard coded "http" to "https." I also checked for the "ws" used internal to websocket and that was also hard coded to "ws." So I changed that as well. I added some debug prints and I get the following output in the console:
I'm pretty sure that's because it's not handling the password. I'll work on it more later. |
It should work. That was resolved in #14. I tested it right now and it works fine. Maybe the port is blocked? If it makes a connection and sees a password prompt it will ask for the password. It silently fails only if it cannot establish a connection. |
If you see hardcoded ws then you are not on the current branch. The line is:
So if baseurl is https then it will end up being wss. Are you on ST2? In this case you will have to take the relevant parts of #14 and implement it for Python 2. Support for ST2 was dropped shortly before that pull. |
Ports definitely not blocked. I get a response trying to set a cookie as shown above and it works in my browser. I think it's because I'm on ST2. I just installed what was in Package Control. |
z-m-k, since you were just switching to python3 4 months ago why didn't you keep 2014-02-13 6:16 GMT-05:00 z-m-k [email protected]:
|
I'd consider this closed based upon dropping support for python 2. |
I just needed it to work and the support was dropped on the day I started implementing this, it is very much a hack even now. I do not think there is a lot you have to change to make it work in Python 2. The big difference is in imports (where you are getting HTTPCookieProcessor, CookieJar, etc.) and how things like urlencode/urlparse work AFAIR. So once you edit the imports so that it works with 2.7.x the code should be good as it is with only a few things needed to be debugged. |
Cool. Just trying to decide if I want to make the changes available or not. 2014-02-15 3:27 GMT-05:00 z-m-k [email protected]:
|
There is a ST2 branch, so if you would like, I would be happy to pull the changes there. That would make it easier for you to reinstall it later on straight from Package Control. |
But there's no further development or support, right? Is there a separate 2014-02-15 15:40 GMT-05:00 Maxim Grechkin [email protected]:
|
There is a separate branch: https://github.com/maximsch2/SublimeIPythonNotebook/tree/st2 that is used by Package Control for installation of ST2 versions (it picks up latest commit from there). It should be relatively easy to backport some of the changes from master branch to ST2 branch, but I am not planning to do that myself, I am not using ST2. |
cool. Thanks. Understood. 2014-02-15 18:08 GMT-05:00 Maxim Grechkin [email protected]:
|
I wonder why doesn't it wanna work with a remote ipython notebook server? I have ipython notebook running on a remote unix machine and I'm forwarding port 7777 (and X11 stuff) through SSH. Works flawlessly in the browser -- just by connecting to 127.0.0.1:7777 from my local machine. However SublimeIPythonNotebook can't seem to be able to connect, any ideas why?
Cannot get a list of notebooks
The text was updated successfully, but these errors were encountered: