These are chat archives for ipython/ipython

15th
Jan 2015
Cyrille Rossant
@rossant
Jan 15 2015 12:44
how to react in Python & JS to a widget being closed (clicking on the 'x' icon, deleting the cell, etc.) ?
Andreas Klostermann
@akloster
Jan 15 2015 13:06
@rossant as far as I know it's not possible to react to a destroyed widget
Cyrille Rossant
@rossant
Jan 15 2015 13:07
@akloster I just found this remove backbone event, seems to be called when the widget is closed
Andreas Klostermann
@akloster
Jan 15 2015 13:07
That may have changed since I last asked.
Ah good to know
but you should test it... I think It didn't work for me... but it was a few weeks ago!
Cyrille Rossant
@rossant
Jan 15 2015 13:08
it does seem to work for me on the latest master
Andreas Klostermann
@akloster
Jan 15 2015 13:08
ok
that's very useful
Cyrille Rossant
@rossant
Jan 15 2015 13:10
yeah, I'm using WebGL widgets and I need to make some cleanup when widgets are destroyed..
Andreas Klostermann
@akloster
Jan 15 2015 13:12
anything cool with webgl?
Cyrille Rossant
@rossant
Jan 15 2015 13:13
IPython notebook/WebGL backend for VisPy
for making fast interactive plots in the notebook
Andreas Klostermann
@akloster
Jan 15 2015 13:24
that looks great
Dave Hirschfeld
@dhirschfeld
Jan 15 2015 14:09
Just a note to mention that after upgrading to the latest ipython I lost all my kernelspecs! I shortly found out that they're now located under C:\ProgramData\jupyter\kernels in contrast to the docs at http://ipython.org/ipython-doc/dev/development/kernels.html
Andreas Klostermann
@akloster
Jan 15 2015 14:18
has anyone put some thought into starting kernels as docker containers? The reason I'm asking is that I have a monolithic uber-jupyter container right now, and I keep adding stuff to that container. But I currently can't think of solutions which are easier than adding stuff to the big container, since IPython would need to communicate to the host, then the host must start a kernel and patch through the port.... So I am adding more coupling in order to decouple the kernel
Kyle Kelley
@rgbkrk
Jan 15 2015 16:07
@akloster - yes
:P
At a low level, that could simply wrap any of the other kernelspecs
as long as it has the kernel installed into that container
I've been thinking about doing this in the coming week, but I have a bunch of stuff going on to deliver
Andreas Klostermann
@akloster
Jan 15 2015 16:10
I'm just asking, not trying to exert any pressure. Basic problem I see is the security around spawning containers... I know security is kinda problematic in IPython system, but maybe giving control of docker over to IPython maybe a bit over the top
Kyle Kelley
@rgbkrk
Jan 15 2015 16:11
The issue to me is more about permissions in the container
What does it access? What data can you reach?
Do you mount from the host, etc.?
Andreas Klostermann
@akloster
Jan 15 2015 16:12
yes, that also.. but the easiest way around this is to use docker's http API
An ideal solution would be a mediating service which can negotiate kernel creation and discovery
in the simplest way, the created kernel has access to what it has access, regardless of where the notebook file is. Or the notebook directory in the IPython notebook container is mounted exactly where it is mounted for the kernels, like /notebooks/
Kyle Kelley
@rgbkrk
Jan 15 2015 16:14
Yeah, I hoped for a mediating service for tmpnb too, that would be nice
Andreas Klostermann
@akloster
Jan 15 2015 16:14
But all that's way past 3.0
Kyle Kelley
@rgbkrk
Jan 15 2015 16:14
yeah
Good to think about though
Andreas Klostermann
@akloster
Jan 15 2015 16:15
In general, lots of people could use a requisitioning service, it would make remote work with IPython easier (remote as in kernel and server on different machines)
Kyle Kelley
@rgbkrk
Jan 15 2015 16:16
For that to happen, we need to be using libsodium with ZeroMQ
That comms are all unencrypted between kernel and server
Andreas Klostermann
@akloster
Jan 15 2015 16:17
From my current view point though, I find that containers are very portable among different computers/systems, but less portable for different users/usecases. I currently end up writing bash scripts which are relatively specific to my setup
Kyle Kelley
@rgbkrk
Jan 15 2015 16:17
The annoying part is that we can't guarantee that people actually have libsodium installed with ZeroMQ
It's not bundled by default and has to be built for it
Andreas Klostermann
@akloster
Jan 15 2015 16:19
you could maybe require the user to setup encrypted tunnels for the remote kernels
if they need encryption
Dave Hirschfeld
@dhirschfeld
Jan 15 2015 17:04

Hi, I'm trying to get a custom icon for my kernel. To test I simply copied the logo-64x64.png from the python2 kernel into the kernelspec directory for my custom kernel, alongside the kernel.json but I don't see the icon and when I change to my custom kernel.
http://localhost:8888/baseurl/kernelspecs/python2/logo-64x64.png
works fine, but
http://localhost:8888/baseurl/kernelspecs/mykernelname/logo-64x64.png
doesn't (404).

Is this supposed to work or am I doing something wrong?

Min RK
@minrk
Jan 15 2015 17:08
maybe a filename or permission issue?
Matthias Bussonnier
@Carreau
Jan 15 2015 17:31
do we have meeting today ?
Min RK
@minrk
Jan 15 2015 17:32
Yup, just getting set up
Matthias Bussonnier
@Carreau
Jan 15 2015 17:32
ok. be right there then.
Jessica B. Hamrick
@jhamrick
Jan 15 2015 17:38
I don’t think I can make it today unfortunately
Min RK
@minrk
Jan 15 2015 17:39
@ellisonbg meeting today?
no problem, just another PR or two to cover
Zachary Jones
@bigzachattack
Jan 15 2015 17:43
@minrk meeting streaming over YouTube?
Min RK
@minrk
Jan 15 2015 17:44
Haven't started broadcast yet, people haven't shown up
Zachary Jones
@bigzachattack
Jan 15 2015 17:44
k
one of the few times I do not have work meetings that overlap, so I don't know the protocol for watching live
Min RK
@minrk
Jan 15 2015 17:45
@bigzachattack we might not be having it today, not enough people showing up
Matthias Bussonnier
@Carreau
Jan 15 2015 17:45
not enough people, we cancellsd the meeting.
and regular meeting will be on tuesday now.
Min RK
@minrk
Jan 15 2015 17:46
But when a meeting actually starts, we will post a youtube link here so you can follow along
Zachary Jones
@bigzachattack
Jan 15 2015 17:48
ok, thanks
Thomas Kluyver
@takluyver
Jan 15 2015 18:23
@bigzachattack we've moved our more regular meeting slot to Tuesdays, by the way. We'll still have Thursday meetings if we've got extra things we need to discuss, but Tuesday will be the most reliable one if you want to watch them.
Brian E. Granger
@ellisonbg
Jan 15 2015 19:04
@minrk sorry I misunderstoon yesterday - I thought there wasn't enough topics for the meeting today
Min RK
@minrk
Jan 15 2015 19:06
No problem, just skipped it. It was just the project_name kernelspec key that I wanted to cover, since there are lots of options there. We can have that discussion in #7454 in the meantime.
Brian E. Granger
@ellisonbg
Jan 15 2015 19:07
ok
Jason Grout
@jasongrout
Jan 15 2015 19:55
@ellisonbg: I'm here
Kyle Kelley
@rgbkrk
Jan 15 2015 21:44
Just noticed the 3.x tag so I made the tag on Docker Hub as well
Min RK
@minrk
Jan 15 2015 22:52
@ellisonbg how are you shutting down terminals when you see a problem?
Is there a running command?
What have you done in the terminal when you try shutting it down?
Are any other actions being taken?
Event with Python 2.7, I can't cause any problems
And can you pip list, just for my sanity. Maybe it's another dependency.
Is this conda py27, or another one?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:08
Hmmmm, no matter what I do I see this. A brand new terminal shows it. Same with one after I run some commands
Running pip list now
abstract-rendering (0.5.1)
ansible (1.8.2)
antipackage (1.0, /Users/bgranger/github/ellisonbg/antipackage)
apptools (4.2.1)
argcomplete (0.8.1)
astropy (0.4.2)
atom (0.3.9)
Babel (1.3)
backports.ssl-match-hostname (3.4.0.2)
beautifulsoup4 (4.3.2)
binstar (0.7.1)
biopython (1.63)
bitarray (0.8.1)
blaze (0.6.5, /Users/bgranger/github/ellisonbg/blaze)
blz (0.6.2)
bokeh (0.6.1)
boto (2.32.1)
brewer2mpl (1.4)
casuarius (1.1)
cdecimal (2.3)
cfclient (2014.12.1-13-g2ef7ac0)
cffi (0.8.6)
chaco (4.4.1)
colorama (0.3.1)
conda (3.7.4)
conda-build (1.8.2)
configobj (5.0.6)
cryptography (0.5.4)
cssselect (0.9.1)
cubes (0.10.2)
cytoolz (0.6.2dev, /Users/bgranger/github/ellisonbg/cytoolz)
DataShape (0.4.1, /Users/bgranger/github/ellisonbg/datashape)
db.py (0.3.2)
decorator (3.4.0)
distribute (0.6.45)
docutils (0.12)
ecdsa (0.11)
enable (4.3.0)
enaml (0.9.8)
envisage (4.4.0)
Fabric (1.8.2)
Flask (0.10.1)
folium (0.1.2, /Users/bgranger/github/ellisonbg/folium)
future (0.13.1)
futures (2.1.6)
fuzzywuzzy (0.4.0)
gevent (1.0.1)
gevent-websocket (0.9.3)
gevent-zeromq (0.2.2)
ggplot (0.5.9, /Users/bgranger/github/ellisonbg/ggplot)
gnureadline (6.3.3)
greenlet (0.4.4)
grin (1.2.1)
h5py (2.3.1)
html5lib (0.999)
husl (2.1.0)
invoke (0.9.0)
ipython (3.0.0-dev, /Users/bgranger/github/ipython/ipython)
ipythonblocks (1.6.1)
iso8601 (0.1.10)
itsdangerous (0.24)
jdcal (1.0)
Jinja2 (2.7.3)
jsonpointer (1.4)
jsonschema (2.4.0)
jupyterhub (0.0.1-dev, /Users/bgranger/github/jupyter/jupyterhub)
keyring (3.3)
kiwisolver (0.1.3)
leafletwidget (0.1, /Users/bgranger/github/ellisonbg/leaftletwidget)
llvmmath (0.1)
llvmpy (0.12.7)
lxml (3.4.0)
Markdown (2.4)
MarkupSafe (0.23)
matplotlib (1.4.0)
mayavi (4.3.1)
MDP (3.3)
meta (development)
mistune (0.4)
mock (1.0.1)
moss (0.2.0)
mpld3 (0.3git, /Users/bgranger/github/ellisonbg/mpld3)
multipledispatch (0.4.0, /Users/bgranger/github/ellisonbg/multipledispatch)
music21 (1.7.1)
nbgrader (0.1, /Users/bgranger/github/jupyter/nbgrader)
nbviewer (0.2.0, /Users/bgranger/github/ipython/nbviewer)
netaddr (0.7.12)
netCDF4 (1.0.7)
networkx (1.9.1)
newrelic (2.18.1.15)
nltk (3.0.0)
nose (1.3.4)
numba (0.14.0)
numexpr (2.3.1)
numpy (1.9.0)
numpydoc (0.5)
openpyxl (1.8.5)
os-diskconfig-python-novaclient-ext (0.1.2)
os-networksv2-python-novaclient-ext (0.21)
os-virtual-interfacesv2-python-novaclient-ext (0.15)
oslo.config (1.4.0)
oslo.i18n (1.0.0)
oslo.utils (1.0.0)
pandas (0.15.0)
paramiko (1.15.2)
patsy (0.3.0)
pbr (0.10.0)
pep8 (1.5.7)
pexpect (3.3)
PIL (1.1.7)
Pillow (2.6.1)
pip (1.5.6)
plotly (0.5.7, /Users/bgranger/github/ellisonbg/plotly-python-api)
ply (3.4)
prettytable (0.7.2)
psutil (2.1.1)
ptyprocess (0.4)
py (1.4.25)
PyAudio (0.2.7)
pycosat (0.6.1)
pycparser (2.10)
pycrypto (2.6.1)
pycurl (7.19.3.1)
pyface (4.4.0)
pyflakes (0.8.1)
Pygments (1.6)
pykit (0.1)
pymongo (2.7.2)
pyOpenSSL (0.14)
pyparsing (2.0.1)
pyquery (1.2.9)
pyrax (1.9.2)
PySAL (1.6.0)
pysam (0.6)
PySDL2 (0.9.3)
pystache (0.5.4)
pytest (2.6.3)
python-dateutil (2.2)
python-keystoneclient (0.11.1)
python-novaclient (2.20.0)
pytz (2014.7)
pyusb (1.0.0b2)
PyYAML (3.11)
pyzmq (14.3.1)
qgrid (0.1.0, /Users/bgranger/github/ellisonbg/qgrid)
Quandl (2.0)
rackspace-auth-openstack (1.3)
rackspace-novaclient (1.4)
rax-default-network-flags-python-novaclient-ext (0.3.1)
rax-scheduled-images-python-novaclient-ext (0.2.2)
redis (2.9.1)
requests (2.5.1)
rope (0.9.4)
rpy2 (2.3.9)
runipy (0.1.1)
scikit-image (0.10.1)
scikit-learn (0.15.2)
scipy (0.14.0)
seaborn (0.4.dev, /Users/bgranger/github/ellisonbg/seaborn)
setuptools (0.6c11)
simplejson (3.6.4)
simplepam (0.1.5)
six (1.8.0)
sockjs-tornado (1.0.1)
Sphinx (1.2.3)
spyder (2.3.1)
SQLAlchemy (0.9.7)
statsmodels (0.5.0)
stevedore (1.0.0)
sympy (0.7.5-git, /Users/bgranger/github/sympy/sympy)
tables (3.1.1)
terminado (0.3.1)
toolz (0.6.0, /Users/bgranger/github/ellisonbg/toolz)
tornado (4.0.2)
traits (4.4.0)
traitsui (4.4.0)
twitter (1.15.0)
ujson (1.33)
unicodecsv (0.9.4)
vincent (0.4.3, /Users/bgranger/github/ellisonbg/vincent)
VTK (5.10.1)
websocket (0.2.1)
Werkzeug (0.9.6)
wheel (0.24.0)
wsgiref (0.1.2)
xlrd (0.9.3)
XlsxWriter (0.5.7)
xlwt (0.7.5)
zpyrpc (0.1, /Users/bgranger/github/ellisonbg/zpyrpc)
I am running conda
Min RK
@minrk
Jan 15 2015 23:15
Can you test in a new conda env?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:16
I don't ever use conda envs, how to create it easily?
With the right packages is the main question...
Min RK
@minrk
Jan 15 2015 23:18
ok, this is what I just did:
conda create -n test-7230 python=2 pip jinja2 pyzmq
source activate test-7230
pip install terminado tornado jsonschema
pip install -e git+git://github.com/ipython/ipython#egg=ipython
ipython notebook
Brian E. Granger
@ellisonbg
Jan 15 2015 23:20
ok trying now
Min RK
@minrk
Jan 15 2015 23:20
Then I did:
  1. click New Terminal
  2. close the tab that just opened
  3. click Shutdown
Brian E. Granger
@ellisonbg
Jan 15 2015 23:23
I did that exact sequence of steps and it still didn't work
Min RK
@minrk
Jan 15 2015 23:24
ok, so it's something that apparently has nothing to do with Python or IPython or any dependency
Brian E. Granger
@ellisonbg
Jan 15 2015 23:24
Hmm, what would Jon and I have in common that you don't have
He sees it as well
San Luis Obispo!
Min RK
@minrk
Jan 15 2015 23:25
ha, that's right - it's probably a latency issue from the secret phone-home all shell commands to Berkeley
Brian E. Granger
@ellisonbg
Jan 15 2015 23:25
More than willing to start debugging a bit
Min RK
@minrk
Jan 15 2015 23:25
OS version?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:25
any particular place to look
Min RK
@minrk
Jan 15 2015 23:25
browser?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:26
Chrome
39.0.2171.95
Min RK
@minrk
Jan 15 2015 23:26
Anything in either the js terminal or server?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:26
Nothing in the server console
Checking js console now
Min RK
@minrk
Jan 15 2015 23:26
ok, I'm on Chrome 41
Brian E. Granger
@ellisonbg
Jan 15 2015 23:27
nothing in js console.
LEt me update chrome
Min RK
@minrk
Jan 15 2015 23:27
Can you start a few terminals?
Then refresh the page with the listing, and click all the shutdown buttons
Brian E. Granger
@ellisonbg
Jan 15 2015 23:29
Still doesn't change
Min RK
@minrk
Jan 15 2015 23:29
one more thing:
Brian E. Granger
@ellisonbg
Jan 15 2015 23:29
I also updated chrome nd that didn't fix it, but I still have latest stable (v39)
Min RK
@minrk
Jan 15 2015 23:29
start the notebook with IPYTHONDIR=/tmp/ipython ipython notebook --port 9876
make sure there isn't any relevant config or cache
Brian E. Granger
@ellisonbg
Jan 15 2015 23:30
Still not working :)
Min RK
@minrk
Jan 15 2015 23:31
Can you add console.log(e) above L104 in tree/js/terminallist.js?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:31
I guess I am added to the if username=='fperez' block of code now too?
Sure
Min RK
@minrk
Jan 15 2015 23:31
to at least confirm that the click event is happening
Brian E. Granger
@ellisonbg
Jan 15 2015 23:33
Yep the event is happening
Min RK
@minrk
Jan 15 2015 23:33
Can you start the server with --debug?
It should log the request, at least
Brian E. Granger
@ellisonbg
Jan 15 2015 23:33
Sure
I do see this even before I try to shutdown the terminal:
[D 15:33:41.434 NotebookApp] 'TermSocket' object has no attribute 'stream'
Min RK
@minrk
Jan 15 2015 23:34
And add a console.log("success") to the success callback there?
ah
hm
Brian E. Granger
@ellisonbg
Jan 15 2015 23:34
I see this in the server debug log when I click the button:
[D 15:34:19.449 NotebookApp] 204 DELETE /api/terminals/1 (::1) 0.69ms
So it is getting to the server OK
Min RK
@minrk
Jan 15 2015 23:34
I see that, too
I got this:
[D 15:34:42.479 NotebookApp] 'TermSocket' object has no attribute 'stream'
[D 15:34:45.674 NotebookApp] 200 GET /api/sessions?_=1421364878937 (::1) 1.09ms
[D 15:34:45.682 NotebookApp] 200 GET /clusters?_=1421364878938 (::1) 2.43ms
[D 15:34:45.687 NotebookApp] 200 GET /api/terminals?_=1421364878939 (::1) 0.85ms
[D 15:34:45.700 NotebookApp] 200 GET /api/contents?type=directory&_=1421364878940 (::1) 6.05ms
[D 15:34:46.537 NotebookApp] 204 DELETE /api/terminals/1 (::1) 0.62ms
[D 15:34:46.549 NotebookApp] 200 GET /api/terminals?_=1421364878941 (::1) 0.65ms
Brian E. Granger
@ellisonbg
Jan 15 2015 23:35
[D 15:33:41.434 NotebookApp] 'TermSocket' object has no attribute 'stream'
[D 15:33:44.175 NotebookApp] 200 GET /api/sessions?_=1421364814643 (::1) 0.68ms
[D 15:33:44.177 NotebookApp] 200 GET /api/terminals?_=1421364814645 (::1) 0.68ms
[D 15:33:44.183 NotebookApp] 200 GET /clusters?_=1421364814644 (::1) 5.61ms
[D 15:33:44.196 NotebookApp] 200 GET /api/contents?type=directory&_=1421364814646 (::1) 11.80ms
[D 15:33:51.140 NotebookApp] 200 GET /api/sessions?_=1421364814647 (::1) 0.70ms
[D 15:33:51.146 NotebookApp] 200 GET /clusters?_=1421364814648 (::1) 4.84ms
[D 15:33:51.147 NotebookApp] 200 GET /api/terminals?_=1421364814649 (::1) 0.55ms
[D 15:33:51.155 NotebookApp] 200 GET /api/contents?type=directory&_=1421364814650 (::1) 7.69ms
[D 15:34:17.770 NotebookApp] 200 GET /api/sessions?_=1421364814651 (::1) 0.84ms
[D 15:34:17.771 NotebookApp] 200 GET /api/terminals?_=1421364814653 (::1) 0.55ms
[D 15:34:17.778 NotebookApp] 200 GET /clusters?_=1421364814652 (::1) 6.64ms
[D 15:34:17.790 NotebookApp] 200 GET /api/contents?type=directory&_=1421364814654 (::1) 11.48ms
[D 15:34:19.449 NotebookApp] 204 DELETE /api/terminals/1 (::1) 0.69ms
[D 15:34:19.453 NotebookApp] 200 GET /api/terminals?_=1421364814655 (::1) 0.72ms
[D 15:34:27.532 NotebookApp] 200 GET /api/sessions?_=1421364814656 (::1) 0.96ms
[D 15:34:27.539 NotebookApp] 200 GET /clusters?_=1421364814657 (::1) 5.88ms
[D 15:34:27.540 NotebookApp] 200 GET /api/terminals?_=1421364814658 (::1) 0.97ms
[D 15:34:27.550 NotebookApp] 200 GET /api/contents?type=directory&_=1421364814659 (::1) 9.05ms
Min RK
@minrk
Jan 15 2015 23:36
And your terminal is still running?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:36
I think I switched dashboard tabs
yep and I can use it fine
Screen Shot 2015-01-15 at 3.36.46 PM.png
I see this in L40 of the DELETE method of the terminal handler:
` # XXX: Should this wait for terminal to finish before returning?
Maybe a timing issue.
Min RK
@minrk
Jan 15 2015 23:41
yeah, maybe kill is failing?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:41
But wouldn't have except?
Damian Avila
@damianavila
Jan 15 2015 23:42
@minrk are you able to replicate the failure? Bacause I am trying and always is working...
Min RK
@minrk
Jan 15 2015 23:46
@ellisonbg can you try from my debug branch here:
pip install -e git+git://github.com/minrk/ipython@debug-term#egg=ipython
Brian E. Granger
@ellisonbg
Jan 15 2015 23:47
Sure
Min RK
@minrk
Jan 15 2015 23:48
It just adds some log statements, but hopefully it will be a bit more informative
you don't have PYTHONPATH set, or anything, right?
Brian E. Granger
@ellisonbg
Jan 15 2015 23:48
installing it now
Definitely not
OK, maybe getting somewhere
I keep getting screenfulls of "Waiting for 1 to die" when I click the button
Still going
And going
The command to kill is given, but it doesn't die, which makes total sense as I can keep using it
I have a phone call in a few minutes - I will try to keep debugging this with you but I may become a bit unresponsive
Min RK
@minrk
Jan 15 2015 23:53
ok
I'll start moving stuff with Fernando when you start your call
Brian E. Granger
@ellisonbg
Jan 15 2015 23:53
Moving stuff - are you guys moving out of the old offices?
Or just moving digital stuff on github like usual...
Min RK
@minrk
Jan 15 2015 23:54
not yet - just consolidating in anticipation of that
Brian E. Granger
@ellisonbg
Jan 15 2015 23:54
ahh
Min RK
@minrk
Jan 15 2015 23:54
moving Fernando's stuff into our office
try getting the PID (echo $$), and sending TERM manually
from another terminal
Brian E. Granger
@ellisonbg
Jan 15 2015 23:58
ok
That definitely killed it
Min RK
@minrk
Jan 15 2015 23:59
hm