These are chat archives for ipython/ipython

30th
Dec 2014
Fernando Perez
@fperez
Dec 30 2014 02:05
mmh, I just pulled master and I can't open any existing notebook. I get this error in the JS console:
"Notebook failed to load from JSON:" TypeError: ks is undefined
Stack trace:
KernelSelector.prototype.change_kernel@http://127.0.0.1:8888/static/notebook/js/kernelselector.js:67:13
Notebook.prototype.fromJSON@http://127.0.0.1:8888/static/notebook/js/notebook.js:1773:17
Notebook.prototype.load_notebook_success@http://127.0.0.1:8888/static/notebook/js/notebook.js:2090:13
.proxy/i@http://127.0.0.1:8888/static/components/jquery/jquery.min.js:4:5486
Anyone else seeing this?
I'm on da9c8d360ad5696
I'll try to continue debugging locally, but I'm curious if anyone else gets this.
Fernando Perez
@fperez
Dec 30 2014 02:10
This is using a clean profile, BTW.
Fernando Perez
@fperez
Dec 30 2014 02:23
Very odd, reading the code in that stack trace, I see:
        var ks = this.kernelspecs[kernel_name];

        var css_url = ks.resources['kernel.css'];
The 2nd line above is the one that triggers the exception, but ks is defined right there, just above. I don't understand this failure at all. Will keep digging...
Fernando Perez
@fperez
Dec 30 2014 02:32
ah, I get it... It's an issue with the kernelpsecs table somehow. Undefined in JS doesn't actually mean undefined :)
Min RK
@minrk
Dec 30 2014 02:58
@fperez I think that was fixed today
Fernando Perez
@fperez
Dec 30 2014 02:59
Just for reference, not much progress... I'm seeing
Min RK
@minrk
Dec 30 2014 02:59
make sure you are on latest master and refresh/restart server.
Fernando Perez
@fperez
Dec 30 2014 02:59
I just pulled from master a minute ago though....
mmh, one more change did just come down.
weird.
Min RK
@minrk
Dec 30 2014 02:59
I fixed it last night, I think the PR was merged today.
Fernando Perez
@fperez
Dec 30 2014 03:00
yup, weird that I'd just pulled about 1h ago, when I started working on this...
ok, all good now!
Very odd, maybe a stale cache issue too?
In any case, I learned a bit more about JS while trying to debug it :)
BTW, it made me think, any way we could catch something like that in tests?
So it can't happen again?
It seems the kernel selection machinery has lots of moving parts, and I worry about it being a bit brittle. thinking how we could fall back to 'assume it's a python notebook if all else fails, with the built-in kernel'
It won't be right in many cases, but it may save people's bacon often.
In this case, I was dead in the water, and pretty stumped debugging deep in the bowels of the system.
Fernando Perez
@fperez
Dec 30 2014 04:01
Oops, sorry all: made a typo fix online and inadvertently did it in the main repo, so I committed without PR. It was just in the docs, so no big deal, but still.. Didn't mean to jump the process :)
Min RK
@minrk
Dec 30 2014 09:27
yes, we can improve the handling of missing kernels.