These are chat archives for ipython/ipython

9th
Jan 2015
juandasgandaras
@juandasgandaras
Jan 09 2015 07:35
how to export the data and variables from iphython qtconsole to a web done with django framework?
without the use of memcached?
Anthony Louis Burns, Esq.
@anthonylouisburns
Jan 09 2015 11:08
where in the code is the jinja template actually applied for the notebook
Scott Sanderson
@ssanderson
Jan 09 2015 18:38
@anthonylouisburns that happens in tornado
most of the interesting tornado configuration gets set up here: https://github.com/ipython/ipython/blob/master/IPython/html/notebookapp.py#L145
that's for the running application at least, if you're looking at nbconvert stuff I think it happens in https://github.com/ipython/ipython/blob/master/IPython/nbconvert/exporters/templateexporter.py
Anthony Louis Burns, Esq.
@anthonylouisburns
Jan 09 2015 18:44
thanks that was what I was wondering - is it possible to specify a different template for the running application
Scott Sanderson
@ssanderson
Jan 09 2015 19:03
@anthonylouisburns yep; take a look at ipython/ipython#6861
Anthony Louis Burns, Esq.
@anthonylouisburns
Jan 09 2015 19:07
@ssanderson OK - now it makes sense - I'll have to see if I can play with that
Brian E. Granger
@ellisonbg
Jan 09 2015 19:36
@minrk I was going to merge #7389 - that OK?
Min RK
@minrk
Jan 09 2015 19:37
@ellisonbg yup, thanks
Brian E. Granger
@ellisonbg
Jan 09 2015 20:03
@minrk I am getting this on master now. Is this related to my merging #7389?
```python
[E 12:02:21.089 NotebookApp] Uncaught exception GET /api/kernels/de0c4099-8ff8-4c27-b25e-8f391c1fdb7c/channels?session_id=7F2BB9975F4846B5BCC89EE00039D866 (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/de0c4099-8ff8-4c27-b25e-8f391c1fdb7c/channels?session_id=7F2BB9975F4846B5BCC89EE00039D866', version='HTTP/1.1', remote_ip='::1', headers={'Origin': 'http://localhost:8888', 'Upgrade': 'websocket', 'Accept-Language': 'en-US,en;q=0.8,gl;q=0.6,sq;q=0.4', 'Accept-Encoding': 'gzip, deflate, sdch', 'Sec-Websocket-Version': '13', 'Host': 'localhost:8888', 'Sec-Websocket-Key': 'DcpZUUYFvFSbrqmteQ4Gkw==', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36', 'Connection': 'Upgrade', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Sec-Websocket-Extensions': 'permessage-deflate; client_max_window_bits'})
    Traceback (most recent call last):
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/web.py", line 1288, in _stack_context_handle_exception
        raise_exc_info((type, value, traceback))
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/web.py", line 1475, in wrapper
        result = method(self, *args, **kwargs)
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/websocket.py", line 175, in get
        self.ws_connection.accept_connection()
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/websocket.py", line 407, in accept_connection
        self._accept_connection()
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/websocket.py", line 453, in _accept_connection
        "\r\n" % (self._challenge_response(), subprotocol_header)))
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/iostream.py", line 328, in write
        self._check_closed()
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/iostream.py", line 835, in _check_closed
        raise StreamClosedError("Stream is closed")
    StreamClosedError: Stream is closed
[E 12:02:21.207 NotebookApp] Uncaught exception GET /api/kernels/de0c4099-8ff8-4c27-b25e-8f391c1fdb7c/channels?session_id=7F2BB9975F4846B5BCC89EE00039D866 (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/de0c4099-8ff8-4c27-b25e-8f391c1fdb7c/channels?session_id=7F2BB9975F4846B5BCC89EE00039D866', version='HTTP/1.1', remote_ip='::1', headers={'Origin': 'http://localhost:8888', 'Upgrade': 'websocket', 'Accept-Language': 'en-US,en;q=0.8,gl;q=0.6,sq;q=0.4', 'Accept-Encoding': 'gzip, deflate, sdch', 'Sec-Websocket-Version': '13', 'Host': 'localhost:8888', 'Sec-Websocket-Key': 'DcpZUUYFvFSbrqmteQ4Gkw==', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36', 'Connection': 'Upgrade', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Sec-Websocket-Extensions': 'permessage-deflate; client_max_window_bits'})
    Traceback (most recent call last):
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/web.py", line 1334, in _execute
        result = yield result
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/gen.py", line 628, in run
        value = future.result()
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/concurrent.py", line 109, in result
        raise_exc_info(self._exc_info)
      File "/Users/bgranger/anaconda/lib/python2.7/site-packages/tornado/gen.py", line 631, in run
        yielded = self.gen.throw(*sys.exc_info())
      File "/Users/bgranger/github/ipython/ipython/IPython/html/services/kernels/handlers.py", line 198, in get
        yield super(ZMQChannelsHandler, self).get(kernel_id=kernel_id)
      File "/Users/bgranger/anaconda/lib/python2.7/site-
Min RK
@minrk
Jan 09 2015 20:09
@ellisonbg could be. Under what circumstances?
In merging the various pieces, I might have lost some of the 'ignore closed stream' checks
Those errors have never been anything but an aesthetic annoyance - not giving up when the frontend has been closed
Brian E. Granger
@ellisonbg
Jan 09 2015 20:12
I got this when I opened a notebook
Right after updating to latest master
I have latest tornado
Min RK
@minrk
Jan 09 2015 20:16
How many notebooks do you have open?
Any still open from a previous session?
Brian E. Granger
@ellisonbg
Jan 09 2015 20:17
This was a brand new notebook server. Let my try to restart it though.
Min RK
@minrk
Jan 09 2015 20:17
And close all browser tabs
Thomas Kluyver
@takluyver
Jan 09 2015 20:17
notebook tabs from a previous server may be trying to reconnect to your new server
Min RK
@minrk
Jan 09 2015 20:18
My guess is it's other notebooks that were open when you restarted the server
Brian E. Granger
@ellisonbg
Jan 09 2015 20:20
Yep, with everything cleared, it seems to be gone
I will keep my eye on it.
Thanks
Do you see a focus jump when you run the first cell of a new notebook with shift+enter?
Min RK
@minrk
Jan 09 2015 20:22
yes
Brian E. Granger
@ellisonbg
Jan 09 2015 20:59
OK I will open an issue...