question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Breaking Bug] Changing 1 argument in kernel.json to support Hydrogen

See original GitHub issue

tslab works for me at jupyter-notebok. I haven’t test for jupyter-lab but i think it will work.

What I am working with is called hydrogen Which is an environment that uses jupyter kernel interfaces to support live code output displaying in the text editor atom by Github.

So the thing is the current generated kernel.json file is like this:

{
 "argv": [
   "tslab", 
   "kernel", 
   "--config-path={connection_file}",
   "--js"
  ], 
  "display_name": "JavaScript", 
  "language": "javascript"
}

Which will break as the string “–config-path={connection_file}” is not matched by jupyter client.

Changing it to this will fix the issue:

{
 "argv": [
   "tslab", 
   "kernel", 
   "--config-path",
   "{connection_file}",
   "--js"
  ], 
  "display_name": "JavaScript", 
  "language": "javascript"
}

The same thing should be done for TypeScript as well.


Note that this is not necessary to change as I believe the problem is with hydrogen.

But since this is an extremely simple fix, why not changing it to support other platform as well?

Especially there starts to have similar plugins for other text editors such as VScode.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
yunabecommented, Aug 10, 2020

Thank you for the detailed investigation.

Is this easy to change? Or are there any reasons not to change?

It’s easy to bypass the issue. I released the new version with the fix (v1.0.13). Let me know if the change does not fix the problem.

0reactions
ed9w2in6commented, Oct 10, 2020

@we684123 😃No worries, it do be like that sometimes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Notebook not saving: '_xsrf' argument missing from post
Just open another (non-running, existing) notebook on the same kernel, and the issue is magically gone; you can again save the notebooks that ......
Read more >
How to fix Kernel Error or broken Python in Jupyter Notebook
TL;DW BELOW! If you delete or upgrade your python version, you might get a Kernel Error when trying to use Jupyter Notebooks!
Read more >
Messaging in Jupyter — jupyter_client 7.4.8 documentation
This document explains the basic communications design and messaging specification for how Jupyter frontends and kernels communicate. The ZeroMQ library ...
Read more >
Bug listing with status RESOLVED with ... - Gentoo's Bugzilla
... Bug:8476 - "Configuring kernel without SMP causes compilation errors" ... Bug:9226 - "Mozilla 1.0.1 compile error (Architecture not supported)" ...
Read more >
Jupyter Documentation - Read the Docs
arguments must be changed by modifying the kernelspec. ... One approach uses jupyter kernelspec list to find the kernel.json file and then ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found