I'm curious if you'd have better luck with ob-ipython?
I haven't tried it yet but I thought I'd share.
https://github.com/gregsexton/ob-ipython

On Friday, July 21, 2017 at 6:22:20 PM UTC-4, John Miller wrote:
>
> Getting EIN working with Jupyterhub has been a long standing request, and 
> I 
> have been trying to get this implemented the past couple days. 
> Unfortunately 
> I've come against a wall and wonder if someone here might be able to 
> provide 
> some guidance. 
>
> At the moment I am using the REST API as documented on the website 
> (https://jupyterhub.readthedocs.io/en/latest/_static/rest-api/index.html) 
> and things go pretty well, up to a certain point. Here is the sequence of 
> events I have programmed: 
>
> 1. After supplying a url, user name, and password, ein sends a query to 
> '/hub/api/authorizations/token'. 
> 2. We store the token, make sure the Authorization header looks like the 
> example code at (https://jupyterhub.readthedocs.io/en/latest/rest.html) 
> then 
> query '/hub/api/user/[user]/server' to start a notebook server. 
> 3. EIN queries '/hub/api/user/[user]' to get information about this user, 
> most importantly we are looking for the server path for the newly started 
> server. 
> 4. Use the server path to use EIN's usual facilities for accessing the 
> notebook server. 
>
> Things work great up until step 4. EIN will try querying, as an example, 
> 'http://127.0.0.1:8000/user/millejoh/api/contents' and Jupyterhub will 
> respond by redirecting to the hub login page. Interestingly enough a call 
> to 
> 'http://127.0.0.1:8000/user/millejoh/api' works as expected, that is it 
> will 
> return JSON with the version of the running notebook server. 
>
> Apparently authenticating via '/hub/api/authentications/token' doesn't 
> really authenticate, at least as far as access to the contents API is 
> concerned? Is there something else EIN needs to be doing to ingratiate 
> itself to jupyterhub and convince the hub it really is a nice guy/gal and 
> promises to play nice with everyone? 
>
> Best regards, 
>
> John 
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/51307cad-6c17-4440-b28b-4513b7853a7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to