vatlab/jupyterlab-sos

Syntax highlight not working for SoS action

Closed this issue ยท 32 comments

gaow commented

Not sure if this is expected behavior, but syntax hightlight seems to fail here for the python action:

2018-05-16-21-58-38_scrot

Thanks. Should be fixed.

gaow commented

Sorry ... it turns out your patch worked for Python, but crippled R somehow -- before at least there are some R syntax higlighting (for eg. if , else, return); now there are none.

2018-05-18-09-19-25_scrot

Please confirm it works so that I can make a release for sos-notebook and jupyterlab-sos.

gaow commented

Looks like it works from that example:

2018-05-18-10-08-54_scrot

Thanks a lot!

I had an issue with no syntax highlighting for micropython kernel after installing sos-note book, but after updating the kernel.json to include:

"language": "python",
"mime type": "text/x-python"

Everything works great now! Not sure where the name value pairs are being used but it works๐Ÿ‘

I think the general problem is that SoS does not know what micropython is based upon and does not know how to highlight. Of course SoS can try to apply some generic highlighting or Python highlighting by default. Anyway, if you specify the language Python for the kernel, SoS will be able to highlight the cells even provide data exchange for the kernel:

image

I am thinking if we should allow users to "register" this kernel with SoS with the correct language / syntax to use.

The codemirror mode is actually available from live kernels so even if SoS does not understand a particular kernel, it can get the codemirror mode from the kernel and highlight the code.

The process is a bit complicated. Basically, cell with an unknown kernel might not be highlighted. When the cell is evaluated, the codemirror mode will be obtained from the live kernel and be used to syntax highlight the cell. After that, the mode will be saved to notebook so that it will be used directly when the notebook is opened.

@PrimeTime416 The changes are large and spread in sos-notebook and jupyterlab-sos. You can use/test the trunk of sos-notebook or wait a few days for a newer version of sos-notebook to be released.

@BoPeng I updated sos and jupyter-lab recently and it lost the syntax highlight for all of the kernels, see an example here.
Screen Shot 2021-03-18 at 11 18 28 AM

Could you attach or PM (ben.bob@gmail.com) me a sample notebook?

Works here. Could you check your version of jupyterlab?

$  Downloads git:(master) โœ— jupyter labextension list
JupyterLab v3.0.5
Other labextensions (built into JupyterLab)
   app dir: /Users/bpeng/anaconda3/envs/ictr/share/jupyter/lab
        @ijmbarr/jupyterlab_spellchecker v0.3.0 enabled OK
        @krassowski/jupyterlab-lsp v3.0.0 enabled OK
        jupyterlab-sos v0.8.1 enabled OK*
        transient-display-data v0.4.1 enabled OK


   local extensions:
        jupyterlab-sos: /Users/bpeng/vatlab/jupyterlab-sos

image

@BoPeng It seems that these extensions are outdated.. Also my nodejs was not updated. Here the result

JupyterLab v3.0.11
/home/dmc2245/miniconda3/share/jupyter/labextensions
        jupyterlab-sos v0.8.0 enabled OK (python, jupyterlab-sos)

Other labextensions (built into JupyterLab)
   app dir: /mnt/mfs/hgrcgrid/homes/dmc2245/miniconda3/share/jupyter/lab
        @jupyterlab/toc v4.0.0 enabled  X
        nbdime-jupyterlab v2.0.1 enabled  X
        transient-display-data v0.4.0 enabled  X

   The following extension are outdated:
        @jupyterlab/toc
        nbdime-jupyterlab
        transient-display-data

   Consider running "jupyter labextension update --all" to check for updates.

Syntax still not working after updating extensions

To match your spec I updated my jupyterlab to 3.0.11 and everything is ok. Could you please update your transient-display-data to 0.4.1 and jupyterlab-sos to 0.8.1 and let me know if the newest versions work?

@BoPeng how can I update to jupyterlab-sos 0.8.1? I see that the latest release is 0.8.0

Sorry, 0.8.1 is my local version, which is the same as 0.8.0. wondering what is going on now.

These are my current settings

JupyterLab v3.0.11
/home/dmc2245/miniconda3/share/jupyter/labextensions
        jupyterlab-sos v0.8.0 enabled OK (python, jupyterlab-sos)

Other labextensions (built into JupyterLab)
   app dir: /mnt/mfs/hgrcgrid/homes/dmc2245/miniconda3/share/jupyter/lab
        @jupyterlab/toc v4.0.0 enabled  X
        nbdime-jupyterlab v2.1.0-beta.1 enabled OK
        transient-display-data v0.4.1 enabled OK

   The following extension are outdated:
        @jupyterlab/toc

   Consider running "jupyter labextension update --all" to check for updates.

OS? browser? Do you see any error message when you open the browser console (browser dependent, shit + right click, inspect for chrome)?

@BoPeng I tried to look at the browser console and it was displaying some warnings which I don't really understand. At this point I was really frustrated and decided to do a fresh install by using conda (the previous time I had installed everything with pip) my syntax coloring is working again after doing this.

The commands I used for this installation

conda install jupyterlab-sos -c conda-forge
conda install -c conda-forge nodejs==15.12.0
conda install sos-r sos-python sos-bash markdown-kernel -c conda-forge
jupyter labextension update --all

My settings at the end

(base) mac:$ jupyter labextension list
JupyterLab v3.0.11
Other labextensions (built into JupyterLab)
   app dir: /Users/dianacornejo/miniconda3/share/jupyter/lab
        jupyterlab-sos v0.8.0 enabled OK
        transient-display-data v0.4.1 enabled OK

The kernels

dianacornejo$ jupyter kernelspec list
Available kernels:
  calysto_bash    /Users/dianacornejo/miniconda3/share/jupyter/kernels/calysto_bash
  ir              /Users/dianacornejo/miniconda3/share/jupyter/kernels/ir
  markdown        /Users/dianacornejo/miniconda3/share/jupyter/kernels/markdown
  python3         /Users/dianacornejo/miniconda3/share/jupyter/kernels/python3
  sos             /Users/dianacornejo/miniconda3/share/jupyter/kernels/sos

Here the screenshot of the warnings if it helps for debugging.

Screen Shot 2021-03-18 at 5 37 38 PM

Screen Shot 2021-03-18 at 5 41 11 PM

Thank you!

gaow commented

I can verify that SoS suite installed via:

pip install docker markdown wand graphviz imageio pillow nbformat feather-format --no-cache-dir
pip install sos sos-notebook sos-r sos-pbs sos-python sos-bash -U --no-cache-dir
python -m sos_notebook.install
pip install jupyterlab-sos -U --no-cache-dir

can reproduce the lack of syntax highlight issue. See below:

image

here is the error message details:

TypeError: Cannot read property 'name' of null
    at :8490/lab/extensions/jupyterlab-sos/static/5.fc7686ac02a2f95df3e5.js:1
    at m (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at Object.l [as emit] (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at e.emit (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._changeKernel (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._startIfNecessary (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._initialize (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at async J.initialize (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
e.exceptionHandler @ :8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2
TypeError: Cannot read property 'open' of undefined
    at T (:8490/lab/extensions/jupyterlab-sos/static/5.fc7686ac02a2f95df3e5.js:1)
    at :8490/lab/extensions/jupyterlab-sos/static/5.fc7686ac02a2f95df3e5.js:1
    at m (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at Object.l [as emit] (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at e.emit (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._changeKernel (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._startIfNecessary (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._initialize (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at async J.initialize (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
TypeError: Cannot read property 'hasOwnProperty' of undefined
    at :8490/lab/extensions/jupyterlab-sos/static/5.fc7686ac02a2f95df3e5.js:1
    at :8490/lab/extensions/jupyterlab-sos/static/5.fc7686ac02a2f95df3e5.js:1
    at m (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at Object.l [as emit] (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at e.emit (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._changeKernel (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._startIfNecessary (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at J._initialize (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
    at async J.initialize (:8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2)
e.exceptionHandler @ :8490/static/lab/jlab_core.2dc148be3bf2729e0225.js?v=2dc148be3bf2729e0225:2
:8490/lab/extensions/jupyterlab-sos/static/5.fc7686ac02a2f95df3e5.js:1 kernel changed to sos
:8490/lab/extensions/jupyterlab-sos/static/5.fc7686ac02a2f95df3e5.js:1 session ready with kernel sos

Here is the js file in question:

5.fc7686ac02a2f95df3e5.js.txt

This issue can be reproduced in a range of OS including Mac, Linux and Windows 10.

This does look like an error from jupyterlab-sos but the js file is minimized which makes it difficult to debug. @dianacornejo did make it work with a fresh installation though.

Could you send me the output of the following?

pip list | grep sos
jupyter labextension list
gaow commented

Thanks @BoPeng actually @dianacornejo did not make it work with fresh installation ... here is the info I have:

gw@cordata:~/Downloads$ pip list | grep sos
sos                               0.22.5
sos-bash                          0.20.0
sos-notebook                      0.22.4
sos-pbs                           0.20.8
sos-python                        0.18.4
sos-r                             0.19.6
gw@cordata:~/Downloads$ jupyter labextension list
JupyterLab v3.0.5
/opt/miniconda3/share/jupyter/labextensions
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /opt/miniconda3/share/jupyter/lab
        @jupyterlab/toc v5.0.3 enabled OK
        jupyterlab-sos v0.8.0 enabled OK
        nbdime-jupyterlab v2.0.1 enabled  X
        transient-display-data v0.4.1 enabled OK

   The following extension are outdated:
        nbdime-jupyterlab
        
   Consider running "jupyter labextension update --all" to check for updates.
gaow commented

@BoPeng Sorry the post above was from a wrong terminal which actually is what ** works with proper syntax highlight** ... I did a fresh installation which reproduced the problem. The setup is below:

[NEU] pip list | grep sos


jupyterlab-sos                    0.8.0              
sos                               0.22.5             
sos-bash                          0.20.0             
sos-notebook                      0.22.4             
sos-pbs                           0.20.8             
sos-python                        0.18.4             
sos-r                             0.19.6  


[NEU] jupyter labextension list
/home/gw2411/miniconda3/lib/python3.8/site-packages/jupyter_server/transutils.py:13: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
  warnings.warn(warn_msg, FutureWarning)
Fail to get yarn configuration. /mnt/mfs/hgrcgrid/homes/gw2411/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:1175
  var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {
                                                                                                                          ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

Fail to get yarn configuration. /mnt/mfs/hgrcgrid/homes/gw2411/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:1175
  var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {
                                                                                                                          ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

Fail to get yarn configuration. /mnt/mfs/hgrcgrid/homes/gw2411/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:1175
  var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {
                                                                                                                          ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

JupyterLab v3.0.12
/home/gw2411/miniconda3/share/jupyter/labextensions
        jupyterlab-sos v0.8.0 enabled OK (python, jupyterlab-sos)

Other labextensions (built into JupyterLab)
   app dir: /mnt/mfs/hgrcgrid/homes/gw2411/miniconda3/share/jupyter/lab
        nbdime-jupyterlab v2.0.1 enabled  X

   The following extension are outdated:
        nbdime-jupyterlab
        
   Consider running "jupyter labextension update --all" to check for updates.

Maybe there are some other extensions we installed that caused the problem?

@BoPeng, when I installed it with conda in my local computer the syntax worked. However, I tried multiple times fresh installations with pip and conda on the cluster. Neither of them worked, whereas conda could recover syntax highlight my kernels kept dying constantly. On the other hand pip installation had no syntax highlight and kernels seemed to be working fine, however yesterday I faced the same kernel dying problem with the pip installation specifically for R kernel.
Here is my full output

(base) dmc2245@hgrcgridlogin:~$ cat jupyter_columbia.sh.e1340106
[I 2021-04-08 03:08:23.095 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-04-08 03:08:39.593 ServerApp] ipyparallel.nbextension | extension was found and enabled by nbclassic. Consider moving the extension to Jupyter Server's extension paths.
[I 2021-04-08 03:08:39.594 ServerApp] ipyparallel.nbextension | extension was successfully linked.
[I 2021-04-08 03:08:40.669 ServerApp] nbdime | extension was found and enabled by nbclassic. Consider moving the extension to Jupyter Server's extension paths.
[I 2021-04-08 03:08:40.669 ServerApp] nbdime | extension was successfully linked.
[I 2021-04-08 03:08:40.669 ServerApp] nbclassic | extension was successfully linked.
[I 2021-04-08 03:08:42.076 ServerApp] Loading IPython parallel extension
[I 2021-04-08 03:08:42.078 ServerApp] ipyparallel.nbextension | extension was successfully loaded.
[I 2021-04-08 03:08:42.082 LabApp] JupyterLab extension loaded from /home/dmc2245/miniconda3/lib/python3.8/site-packages/jupyterlab
[I 2021-04-08 03:08:42.082 LabApp] JupyterLab application directory is /mnt/mfs/hgrcgrid/homes/dmc2245/miniconda3/share/jupyter/lab
[I 2021-04-08 03:08:42.136 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-04-08 03:08:42.344 ServerApp] nbclassic | extension was successfully loaded.
[I 2021-04-08 03:08:45.540 ServerApp] nbdime | extension was successfully loaded.
[I 2021-04-08 03:08:45.540 ServerApp] Serving notebooks from local directory: /mnt/mfs/hgrcgrid/homes/dmc2245
[I 2021-04-08 03:08:45.541 ServerApp] Jupyter Server 1.4.1 is running at:
[I 2021-04-08 03:08:45.541 ServerApp] http://node62:9516/lab?token=bf144bfc97a7c7e7106aad363cb5cd3ecebad11407f19340
[I 2021-04-08 03:08:45.541 ServerApp]  or http://127.0.0.1:9516/lab?token=bf144bfc97a7c7e7106aad363cb5cd3ecebad11407f19340
[I 2021-04-08 03:08:45.541 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2021-04-08 03:08:45.668 ServerApp]

    To access the server, open this file in a browser:
        file:///mnt/mfs/hgrcgrid/homes/dmc2245/.local/share/jupyter/runtime/jpserver-12434-open.html
    Or copy and paste one of these URLs:
        http://node62:9516/lab?token=bf144bfc97a7c7e7106aad363cb5cd3ecebad11407f19340
     or http://127.0.0.1:9516/lab?token=bf144bfc97a7c7e7106aad363cb5cd3ecebad11407f19340
[I 2021-04-08 03:09:14.800 LabApp] Build is up to date
[W 2021-04-08 03:09:37.989 ServerApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:38.194 ServerApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:38.617 ServerApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:38.652 ServerApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:38.843 ServerApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:38.873 ServerApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:39.023 ServerApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:39.063 ServerApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:39.573 ServerApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:39.599 ServerApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:41.477 ServerApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:41.505 ServerApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:42.460 ServerApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:42.847 ServerApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:42.957 ServerApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:43.078 ServerApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:43.342 ServerApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:44.607 ServerApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:45.763 ServerApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:45.838 ServerApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.100 ServerApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.116 ServerApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.220 ServerApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.251 ServerApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.361 ServerApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.389 ServerApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.698 ServerApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:46.721 ServerApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:48.394 ServerApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:48.420 ServerApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:49.210 ServerApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:49.495 ServerApp] Config option `template_path` not recognized by `TocExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:49.623 ServerApp] Config option `template_path` not recognized by `LenvsHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:49.759 ServerApp] Config option `template_path` not recognized by `LenvsTocHTMLExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:50.053 ServerApp] Config option `template_path` not recognized by `LenvsLatexExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:51.260 ServerApp] Config option `template_path` not recognized by `LenvsSlidesExporter`.  Did you mean one of: `extra_template_paths, template_name, template_paths`?
[W 2021-04-08 03:09:56.848 ServerApp] Notebook project/UKBB_GWAS_dev/workflow/VCF_QC.ipynb is not trusted
[W 2021-04-08 03:09:57.222 ServerApp] Notebook project/UKBB_GWAS_dev/workflow/VCF_QC_pipeline.ipynb is not trusted
[W 2021-04-08 03:09:57.268 ServerApp] Notebook project/UKBB_GWAS_dev/analysis/cluster_scripts/VCF_QC_scripts.ipynb is not trusted
[I 2021-04-08 03:09:59.319 ServerApp] Kernel started: f4707180-1c24-4207-8df2-5b2b7df4267a
[I 2021-04-08 03:09:59.324 ServerApp] Kernel started: 2364f23b-667c-4cfd-bf77-c7dbd081a2c9
[I 2021-04-08 03:09:59.325 ServerApp] Kernel started: f1dde5b3-5176-4a1b-b72c-549d1e2f92bf
[I 2021-04-08 03:09:59.420 ServerApp] Kernel started: 2329eb06-a340-47ee-a77e-38f086157d61
[W 2021-04-08 03:10:11.719 ServerApp] Notebook project/UKBB_GWAS_dev/workflow/Untitled.ipynb is not trusted
[I 2021-04-08 03:10:12.211 ServerApp] Kernel started: 6dbff503-f0c7-4b50-b945-29aaaf431946
[I 2021-04-08 03:10:20.990 ServerApp] Starting buffering for 2329eb06-a340-47ee-a77e-38f086157d61:2ced9162-e936-4d03-8dd5-4ca654d18ea0
[W 2021-04-08 03:10:29.140 ServerApp] Notebook project/UKBB_GWAS_dev/workflow/Untitled1.ipynb is not trusted
[I 2021-04-08 03:10:34.779 ServerApp] Kernel started: bef5320f-24f8-47e3-ba0c-d41a280e2caa
[I 2021-04-08 03:10:37.778 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
[I 2021-04-08 03:10:40.805 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (2/5), new random ports
[I 2021-04-08 03:10:43.826 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (3/5), new random ports
[I 2021-04-08 03:10:46.857 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (4/5), new random ports
[W 2021-04-08 03:10:49.886 ServerApp] AsyncIOLoopKernelRestarter: restart failed
[W 2021-04-08 03:10:49.886 ServerApp] Kernel bef5320f-24f8-47e3-ba0c-d41a280e2caa died, removing from map.
[W 2021-04-08 03:11:37.159 ServerApp] Timeout waiting for kernel_info reply from bef5320f-24f8-47e3-ba0c-d41a280e2caa
[E 2021-04-08 03:11:37.161 ServerApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: bef5320f-24f8-47e3-ba0c-d41a280e2caa)
[I 2021-04-08 03:11:39.907 ServerApp] Kernel started: f1e753a0-d79c-4688-849d-2172ed368f43
[I 2021-04-08 03:11:42.906 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
[I 2021-04-08 03:11:45.928 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (2/5), new random ports
[I 2021-04-08 03:11:48.955 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (3/5), new random ports
[I 2021-04-08 03:11:51.570 ServerApp] Starting buffering for 2364f23b-667c-4cfd-bf77-c7dbd081a2c9:89b6c896-a6ef-4d8b-996c-623d7992bbac
[I 2021-04-08 03:11:51.980 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (4/5), new random ports
[I 2021-04-08 03:11:52.458 ServerApp] Starting buffering for f1dde5b3-5176-4a1b-b72c-549d1e2f92bf:a8253b97-7606-46ac-8de7-03d8c6a4c081
[W 2021-04-08 03:11:55.006 ServerApp] AsyncIOLoopKernelRestarter: restart failed
[W 2021-04-08 03:11:55.006 ServerApp] Kernel f1e753a0-d79c-4688-849d-2172ed368f43 died, removing from map.

I would appreciate any help.

Thanks a lot

gaow commented

I tried a fresh minimal installation by removing miniconda3 and all the relevant hidden folder and files I can find under my $HOME, then ran:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
pip install jupyterlab-sos -U --no-cache-dir

then tried to start it, and get:

image

(with more warning/error messages on the right side).

The diagnostic commands:

[NEU] pip list | grep sos
jupyterlab-sos         0.8.0
[NEU] jupyter labextension list
Fail to get yarn configuration. /mnt/mfs/hgrcgrid/homes/gw2411/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:1175
  var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {
                                                                                                                          ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

Fail to get yarn configuration. /mnt/mfs/hgrcgrid/homes/gw2411/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:1175
  var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {
                                                                                                                          ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

Fail to get yarn configuration. /mnt/mfs/hgrcgrid/homes/gw2411/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:1175
  var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {
                                                                                                                          ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

JupyterLab v3.1.0a4
/home/gw2411/miniconda3/share/jupyter/labextensions
        jupyterlab-sos v0.8.0 enabled OK (python, jupyterlab-sos)

This is due to a change in interface (jupyterlab/jupyterlab#7284), which I have superficially changed so that jupyterlab-sos could compile with jupyterlab, but the error checking part, perhaps even something deeper is missing.

Right now I am not sure how difficult it is to properly fix it.

gaow commented

Thank you @BoPeng. This has been bothering some of our users (including @dianacornejo). Somehow syntax highlight seems important for those who are used to having it, so any patch would be helpful ...

The easiest solution is to downgrade jupyterlab for now because the api is so new and I have to read source code to learn how to use it, and that might take some time.

gaow commented

Thanks @BoPeng sounds reasonable. @dianacornejo maybe we can try downgrade it by specifying Jupyter Lab to a specific 2.x version, unless you are using other essential extensions that needs JLab 3?

Or swap between JLab and Notebook interface for your JLab installation.... but I felt that I missed anything when I was using JLab 2.x so perhaps downgrade is easier.

Had to throw the question to the core developers: jupyterlab/jupyterlab#10095

As usual, the JLab developers were very helpful. @gaow @dianacornejo Could you please try

pip install jupyterlab-sos -U

and see if version 0.8.1 works on your end? I will make a conda release after your confirmation.

gaow commented

Thank you @BoPeng , now we are cooking with gas!

image

Phew, finally. Let me turn to another pending ticket on sos.