Can I replace the kernel.js file with my own?

21 views
Skip to first unread message

ans...@broadinstitute.org

unread,
Apr 3, 2018, 3:39:03 PM4/3/18
to Project Jupyter
Hi,


I want to do this because restarting or switching my kernel within a notebook sets up an infinite loop of the websocket trying to connect failing and retrying. I want to modify the kernel.js as a workaround so that it just reloading the page after killing the session and creating a new session. 
 
Is there a way for me to do modify the kernel.js to do that? 

I know that you can define a kernel.js per kernel, but I don't think that will work in my case, as I believe the custom kernel.js runs after the kernel.js linked above, so we'd be stuck there and the custom kernel.js would never run. (please correct me if I'm wrong in that assumption)

Thank you! 

Thomas Kluyver

unread,
Apr 3, 2018, 4:10:01 PM4/3/18
to Project Jupyter
The JS files aren't loaded directly, rather they're bundled into a big file called main.min.js. There's information on how to rebuild that here:
http://jupyter-notebook.readthedocs.io/en/stable/contributing.html#setting-up-a-development-environment

If you can see what you need to do, you're free to change any of the code in Jupyter. But if something's going wrong, it might be best to file an issue and try to work out a fix that we can incorporate into the project - that way it's also solved for anyone else with the same problem.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/45db1825-1282-413c-814b-638da00408e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages