Hello Andrey,

POST /service worked, thanks.

Regarding websockets, I read about the shell/iopub couple here 
<https://github.com/sagemath/sagecell/blob/master/doc/messages.md>
I replaced the shell/iopub pair with:

surl = data.ws_url + "kernel/" + data.id + "/channels";
try {
  wso = new WebSocket(surl);
} catch(e) {
  alert(e);
}

And now the error is:

WebSocket connection to 
'wss://sagecell.sagemath.org/kernel/74d6b265-9e9d-4eea-b6a6-ef6d1ace3da1/channels'
 
failed: Error during WebSocket handshake: Unexpected response code: 403

I guess the error is because I do not include the header:
   Jupyter-Kernel-ID:" + data.id
when I create the websocket
The issue is that the Javascript Websocket API does not allow to include a 
header just like the Python API does
I think SockJS API does not allow it either

Any suggestions?
Jorge

El sábado, 4 de noviembre de 2017, 1:15:10 (UTC-4), Andrey Novoseltsev 
escribió:
>
> Hi Jorge,
>
> Thanks a lot for trying and reporting results!
>
> For POST / service: can you try print(factorial(10)) with explicit output? 
> I suspect the display hook works differently for it, that's why the health 
> check uses code = 'print({} + {})'.format(a, b)
>
> For Websockets: where did you learn shell/iopub additions? They were 
> indeed used a couple years ago, but now there is a single link with channel 
> name embedded in messages, 
> https://github.com/sagemath/sagecell/blob/master/contrib/sagecell-client/sagecell-client.py#L31
>  
> is relevant.
>
> Best,
> Andrey
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-cell" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-cell/3151faa5-ff71-478a-8478-6d886fea2832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to