These are chat archives for ipython/ipython

22nd
Dec 2014
Stuart Mumford
@Cadair
Dec 22 2014 15:33
Hello
I am trying to follow up on #6969 and build kernel specs in code rather than json files
I however can not get it working
IPython notebook is not giving me any helpful errors, just kernel not foudn
I have a working json file that I am trying to use as a template.
            kspec_dict = {
                     "display_name": "conda ({})".format(venv_name),
                     "language": "python",
                     "code_mirrormode": {'version':2, 'name':'ipython'},
                     "argv": [
                      exe_name,
                      "-c",
                      "from IPython.kernel.zmq.kernelapp import main; main()",
                      "-f",
                      "{connection_file}"
                     ]
                    }
            kspec = KernelSpec(venv_dir, **kspec_dict)
is what I have at the moment
Stuart Mumford
@Cadair
Dec 22 2014 16:15
I have tried something new and it still isn't working :(
it is really the lack of error that is killing me!
Doug Blank
@dsblank
Dec 22 2014 16:16
I thought language was moved to language_info... where are you getting the kernelspec details? Are you using ipython 3.0.0?
Matthias Bussonnier
@Carreau
Dec 22 2014 16:35
I think it moved again this week-end.
trying to catch up.
@rgbkrk is tmpnb down ? I can't resolve DNS ?
Kyle Kelley
@rgbkrk
Dec 22 2014 16:36
https
Matthias Bussonnier
@Carreau
Dec 22 2014 16:37
nop.
no DNS
Kyle Kelley
@rgbkrk
Dec 22 2014 16:37
Weird, working fine for me
Damian Avila
@damianavila
Dec 22 2014 16:38
not working for me
Matthias Bussonnier
@Carreau
Dec 22 2014 16:38
ha, redirect tmpnb02.tmpnb.org, but still nothing after.
Kyle Kelley
@rgbkrk
Dec 22 2014 16:38
what happens if you do a dig?
hmmm
Matthias Bussonnier
@Carreau
Dec 22 2014 16:38
$ ssh ks
Linux elacave.lmdb.eu 2.6.38.2-grsec-xxxx-grs-ipv6-64 #1 SMP Fri Apr 15 17:44:15 UTC 2011 x86_64 GNU/Linux

server    : 58016
ip        : 91.121.208.77
hostname  : elacave.lmdb.eu

No mail.
Last login: Sun Dec  7 16:04:45 2014 from rob92-9-88-161-115-211.fbx.proxad.net
hcarreau@elacave:~$ host tmpnb.jupyter.org
Host tmpnb.jupyter.org not found: 3(NXDOMAIN)
carreau@elacave:~$ dig tmpnb.jupyter.org

; <<>> DiG 9.7.3 <<>> tmpnb.jupyter.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 24073
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;tmpnb.jupyter.org.        IN    A

;; AUTHORITY SECTION:
jupyter.org.        10789    IN    SOA    marek.ns.cloudflare.com. dns.cloudflare.com. 2017033319 10000 2400 604800 3600

;; Query time: 16 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Dec 22 17:36:04 2014
;; MSG SIZE  rcvd: 98
Kyle Kelley
@rgbkrk
Dec 22 2014 16:39
There is no tmpnb.jupyter.org
can you do a dig on tmpnb.org and tmp02.tmpnb.org
Damian Avila
@damianavila
Dec 22 2014 16:40
for me, it redirects after some time to tmp02.tmpnb.org... ans it is working from there...
Matthias Bussonnier
@Carreau
Dec 22 2014 16:40
sorry
$ dig tmpnb.org

; <<>> DiG 9.8.3-P1 <<>> tmpnb.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53075
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;tmpnb.org.            IN    A

;; ANSWER SECTION:
tmpnb.org.        134    IN    A    104.130.18.111

;; Query time: 4 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Dec 22 17:40:16 2014
;; MSG SIZE  rcvd: 43

MacBook-Pro-de-Matthias:~ bussonniermatthias$ dig tmp01.tmpnb.org

; <<>> DiG 9.8.3-P1 <<>> tmp01.tmpnb.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 29275
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;tmp01.tmpnb.org.        IN    A

;; Query time: 96 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Dec 22 17:40:33 2014
;; MSG SIZE  rcvd: 33
tmpnb01 is commented
Stuart Mumford
@Cadair
Dec 22 2014 16:43
hey @dsblank Random sources.
I built a newer one by doing a json dump of the native kernel, I know have this:
            kspec_dict =  {"argv": [exe_name,
                                    "-m",
                                    "IPython.kernel",
                                    "-f",
                                    "{connection_file}"],
                           "display_name": "conda ({})".format(venv_name),
                           "env": {}}

            kspecs.update({venv_name: KernelSpec(**kspec_dict)})
it still does not work!
Kyle Kelley
@rgbkrk
Dec 22 2014 16:48
Weird it's like tmp02 hasn't propagated
Stuart Mumford
@Cadair
Dec 22 2014 16:49
@dsblank also, yeah Python 3.0.0-dev
Matthias Bussonnier
@Carreau
Dec 22 2014 16:50
@rgbkrk neither 01 or 02 work for me.
when did you deployed ?
ok, status.jupyter.org down too.
back on
Kyle Kelley
@rgbkrk
Dec 22 2014 16:57
K, thanks. I won't be able to touch it at all right now.
Matthias Bussonnier
@Carreau
Dec 22 2014 17:00
No problem.
People are not complaining.
(yet)
Kyle Kelley
@rgbkrk
Dec 22 2014 18:02
tmp01.tmpnb.org. 300 IN A 104.130.160.5
Are you able to reach it directly?
What DNS do you use? Your internet provider or Google?
Matthias Bussonnier
@Carreau
Dec 22 2014 18:03
let me check.
directly yes.
My Provider DNS. let me switch.
works fine wih google DNS indeed.
Kyle Kelley
@rgbkrk
Dec 22 2014 18:38
Can you update the status back?
i tried DNS lookups from other data centers and providers, all good
@damianavila are you running into the same issue too from down south?
Matthias Bussonnier
@Carreau
Dec 22 2014 18:42
I've put it back to normal.
Dale Jung
@dalejung
Dec 22 2014 18:44
What's the normal procedure for updating CodeMirror? Does it get auto updated once a new release gets cut?
Kyle Kelley
@rgbkrk
Dec 22 2014 18:45
little to go on 😕
Dale Jung
@dalejung
Dec 22 2014 18:48
fyi: 4.8 has a regression that broke vim. codemirror/CodeMirror#2915 I'm currently running CodeMirror master which fixed the issue.
Kyle Kelley
@rgbkrk
Dec 22 2014 18:48
Weird gitter did my messages backwards
Damian Avila
@damianavila
Dec 22 2014 21:08
@rgbkrk, from the south it is working OK right now...
Min RK
@minrk
Dec 22 2014 21:12
@dalejung CodeMirror 4.9 should be out shortly, and we can pull it into IPython 3
Dale Jung
@dalejung
Dec 22 2014 21:16
@minrk coo coo, wasn't sure if there was usually a lag after release. good to know
Min RK
@minrk
Dec 22 2014 21:16
It varies, but we are generally faster to pick it up when we know there's an issue that it will fix.
Zachary Jones
@bigzachattack
Dec 22 2014 21:23
With IPython3, is the default kernel for the NewNotebookWidget suppose to be the same as what is specified by "MappingKernelManager.default_kernel_name" which applies to opening existing unspecified notebooks?
Min RK
@minrk
Dec 22 2014 21:23
I believe so, yes
Do you see a different value?
That value is only used if no user preference is set, which is persisted in 'frontend-config' and takes precedence over the server's own default.
Zachary Jones
@bigzachattack
Dec 22 2014 21:32

I have an email on ipython-dev as well..
http://localhost:80000/api/config/tree
returns: {"NewNotebookWidget": {"default_kernel": "python3"}}

http://localhost:8000/api/kernelspecs
returns {"default": "na_python2", "kernelspecs": {"na_python2": {"display_name": "ANetApp Stack (Python 2)", "env": {}, "name": "na_python2", "argv": [<omitted>]}, "python3": {"display_name": "IPython (Python 3)", "env": {}, "name": "python3", "argv": [<omitted>]}}}

Min RK
@minrk
Dec 22 2014 21:32
ok
and what if you remove the file .ipython/profile_default/nbconfig/tree.json?
Zachary Jones
@bigzachattack
Dec 22 2014 21:34
Ugh. That fixed it.
Min RK
@minrk
Dec 22 2014 21:35
Try starting a new notebook with a specific kernel, and see if it persists.
Zachary Jones
@bigzachattack
Dec 22 2014 21:37
Problem is gone.
Min RK
@minrk
Dec 22 2014 21:37
There's a confusing hierarchy of defaults. The user can pick a default for that button, which is used for making new notebooks with an explicit kernel choice. That has the highest priority. The initial default for the button is set from the REST API's own default kernel name, which is used when a kernel is requested without an explicit kernel choice.
So it's possible for the two values to differ, but they start out the same
Zachary Jones
@bigzachattack
Dec 22 2014 21:52
So for any of my users, if they have used IPython3 without --MappingKernelManager.default_kernel_name, tree.json will be generated with python3. If they run with the flag, then the tree.json will be generated with the name specified.
Is that correct?
Min RK
@minrk
Dec 22 2014 21:58
The file shouldn't be generated until/unless a new default is selected
in master, that's only possible by making a JavaScript API call in the console.
For a time in master, selecting anything from that menu would be remembered, which is probably what you are seeing. But that's not how it works anymore.
So tree.json shouldn't exist for most (or any) users
But it will if they used master from a few weeks ago
Zachary Jones
@bigzachattack
Dec 22 2014 22:01
Is it supposed to get generated if it does not exist?
That is happening with commit dc60d34
Min RK
@minrk
Dec 22 2014 22:08
It shouldn't be, no. I'll look into that.
Zachary Jones
@bigzachattack
Dec 22 2014 22:36
So the front end issues a PATCH /api/config/tree on page load of /tree
The handler calls config_manager.update().
The update function calls config_manager.get()
Then set()
Which writes the file out regardless of its prior existence.
Min RK
@minrk
Dec 22 2014 22:42
is the file empty?
Min RK
@minrk
Dec 22 2014 22:53
@bigzachattack it looks like the default kernel selection is going to be removed in #7279
Zachary Jones
@bigzachattack
Dec 22 2014 23:23
Well then, problem solved.