Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoS kernel does not show dropdown box in cell #226

Open
ADGM opened this issue Jul 1, 2019 · 16 comments
Open

SoS kernel does not show dropdown box in cell #226

ADGM opened this issue Jul 1, 2019 · 16 comments

Comments

@ADGM
Copy link

ADGM commented Jul 1, 2019

Hi,

I was interested in using SoS notebook so I installed the respective kernels I wanted to use (R, Python3, bash), but within the notebook interface the dropdown box for selecting a kernel for a cell does not appear and so I cannot use SoS for its intended purpose:

$ jupyter kernelspec list
Available kernels:
  bash       /home/.local/share/jupyter/kernels/bash
  ir         /home/.local/share/jupyter/kernels/ir
  sos        /home/.local/share/jupyter/kernels/sos
  python3    /software/anaconda/anaconda3/share/jupyter/kernels/python3

image

image

I hope I can be helped with this, thank you.

@BoPeng
Copy link
Contributor

BoPeng commented Jul 1, 2019

vatlab/jupyterlab-sos#32 (comment) has some debug information but your case seems to be simpler. Could you make sure you are running the latest of everything by running pip install -U sos sos-notebook sos-python sos-r sos-bash? Also, could you let me know the OS and browser that you use? If you can, please also open the development console and see if you see any error message when a notebook is opened.

@ADGM
Copy link
Author

ADGM commented Jul 1, 2019

Hi,
Thank you for responding!

  • I am using Ubuntu 18.04.2 LTS 64-bit

  • I use Chrome or Firefox for launching Jupyter and the issue appears on either

  • I launch Jupyter notebook from a conda environment I created for all my sos-related installs


  • I checked and there seems to be only one installation of sos_notebook
(sos) [~]$ ls .conda/envs/sos/lib/python3.7/site-packages/sos_notebook*
.conda/envs/sos/lib/python3.7/site-packages/sos_notebook:
completer.py  install_sos_notebook.sh  __pycache__       test_utils.py
converter.py  kernel.js                sos-full.tpl      _version.py
__init__.py   kernel.py                sos-report.tpl    workflow_executor.py
inspector.py  logo-64x64.png           step_executor.py
install.py    magics.py                templates

.conda/envs/sos/lib/python3.7/site-packages/sos_notebook-0.19.9.dist-info:
entry_points.txt  INSTALLER  METADATA  RECORD  top_level.txt  WHEEL


  • All my installs appear to be up-to-date
(sos) [~]$ pip install -U sos sos-notebook sos-python sos-r sos-bash
Requirement already up-to-date: sos in ./.conda/envs/sos/lib/python3.7/site-packages (0.19.13)
Requirement already up-to-date: sos-notebook in ./.conda/envs/sos/lib/python3.7/site-packages (0.19.9)
Requirement already up-to-date: sos-python in ./.conda/envs/sos/lib/python3.7/site-packages (0.18.1)
Requirement already up-to-date: sos-r in ./.conda/envs/sos/lib/python3.7/site-packages (0.19.1)
Requirement already up-to-date: sos-bash in ./.conda/envs/sos/lib/python3.7/site-packages (0.18.1)
Requirement already satisfied, skipping upgrade: nbformat in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (4.4.0)
Requirement already satisfied, skipping upgrade: pygments in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (2.4.2)
Requirement already satisfied, skipping upgrade: pexpect in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (4.7.0)
Requirement already satisfied, skipping upgrade: tqdm in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (4.32.2)
Requirement already satisfied, skipping upgrade: networkx in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (2.3)
Requirement already satisfied, skipping upgrade: jinja2 in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (2.10.1)
Requirement already satisfied, skipping upgrade: psutil in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (5.6.3)
Requirement already satisfied, skipping upgrade: xxhash; sys_platform != "win32" in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (1.3.0)
Requirement already satisfied, skipping upgrade: pydot in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (1.4.1)
Requirement already satisfied, skipping upgrade: pydotplus in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (2.0.2)
Requirement already satisfied, skipping upgrade: pyyaml in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (5.1.1)
Requirement already satisfied, skipping upgrade: pyzmq in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (18.0.2)
Requirement already satisfied, skipping upgrade: fasteners in ./.conda/envs/sos/lib/python3.7/site-packages (from sos) (0.15)
Requirement already satisfied, skipping upgrade: nbconvert>=5.1.1 in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-notebook) (5.5.0)
Requirement already satisfied, skipping upgrade: ipykernel in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-notebook) (5.1.1)
Requirement already satisfied, skipping upgrade: notebook>=5.0.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-notebook) (5.7.8)
Requirement already satisfied, skipping upgrade: numpy in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-notebook) (1.16.4)
Requirement already satisfied, skipping upgrade: pandas in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-notebook) (0.24.2)
Requirement already satisfied, skipping upgrade: tabulate in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-notebook) (0.8.3)
Requirement already satisfied, skipping upgrade: ipython in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-notebook) (7.6.0)
Requirement already satisfied, skipping upgrade: feather-format in ./.conda/envs/sos/lib/python3.7/site-packages (from sos-r) (0.4.0)
Requirement already satisfied, skipping upgrade: jupyter-core in ./.conda/envs/sos/lib/python3.7/site-packages (from nbformat->sos) (4.5.0)
Requirement already satisfied, skipping upgrade: traitlets>=4.1 in ./.conda/envs/sos/lib/python3.7/site-packages (from nbformat->sos) (4.3.2)
Requirement already satisfied, skipping upgrade: jsonschema!=2.5.0,>=2.4 in ./.conda/envs/sos/lib/python3.7/site-packages (from nbformat->sos) (3.0.1)
Requirement already satisfied, skipping upgrade: ipython-genutils in ./.conda/envs/sos/lib/python3.7/site-packages (from nbformat->sos) (0.2.0)
Requirement already satisfied, skipping upgrade: ptyprocess>=0.5 in ./.conda/envs/sos/lib/python3.7/site-packages (from pexpect->sos) (0.6.0)
Requirement already satisfied, skipping upgrade: decorator>=4.3.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from networkx->sos) (4.4.0)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in ./.conda/envs/sos/lib/python3.7/site-packages (from jinja2->sos) (1.1.1)
Requirement already satisfied, skipping upgrade: pyparsing>=2.1.4 in ./.conda/envs/sos/lib/python3.7/site-packages (from pydot->sos) (2.4.0)
Requirement already satisfied, skipping upgrade: six in ./.conda/envs/sos/lib/python3.7/site-packages (from fasteners->sos) (1.12.0)
Requirement already satisfied, skipping upgrade: monotonic>=0.1 in ./.conda/envs/sos/lib/python3.7/site-packages (from fasteners->sos) (1.5)
Requirement already satisfied, skipping upgrade: defusedxml in ./.conda/envs/sos/lib/python3.7/site-packages (from nbconvert>=5.1.1->sos-notebook) (0.6.0)
Requirement already satisfied, skipping upgrade: pandocfilters>=1.4.1 in ./.conda/envs/sos/lib/python3.7/site-packages (from nbconvert>=5.1.1->sos-notebook) (1.4.2)
Requirement already satisfied, skipping upgrade: mistune>=0.8.1 in ./.conda/envs/sos/lib/python3.7/site-packages (from nbconvert>=5.1.1->sos-notebook) (0.8.4)
Requirement already satisfied, skipping upgrade: bleach in ./.conda/envs/sos/lib/python3.7/site-packages (from nbconvert>=5.1.1->sos-notebook) (3.1.0)
Requirement already satisfied, skipping upgrade: testpath in ./.conda/envs/sos/lib/python3.7/site-packages (from nbconvert>=5.1.1->sos-notebook) (0.4.2)
Requirement already satisfied, skipping upgrade: entrypoints>=0.2.2 in ./.conda/envs/sos/lib/python3.7/site-packages (from nbconvert>=5.1.1->sos-notebook) (0.3)
Requirement already satisfied, skipping upgrade: tornado>=4.2 in ./.conda/envs/sos/lib/python3.7/site-packages (from ipykernel->sos-notebook) (6.0.3)
Requirement already satisfied, skipping upgrade: jupyter-client in ./.conda/envs/sos/lib/python3.7/site-packages (from ipykernel->sos-notebook) (5.2.4)
Requirement already satisfied, skipping upgrade: terminado>=0.8.1 in ./.conda/envs/sos/lib/python3.7/site-packages (from notebook>=5.0.0->sos-notebook) (0.8.2)
Requirement already satisfied, skipping upgrade: Send2Trash in ./.conda/envs/sos/lib/python3.7/site-packages (from notebook>=5.0.0->sos-notebook) (1.5.0)
Requirement already satisfied, skipping upgrade: prometheus-client in ./.conda/envs/sos/lib/python3.7/site-packages (from notebook>=5.0.0->sos-notebook) (0.7.1)
Requirement already satisfied, skipping upgrade: pytz>=2011k in ./.conda/envs/sos/lib/python3.7/site-packages (from pandas->sos-notebook) (2019.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.5.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from pandas->sos-notebook) (2.8.0)
Requirement already satisfied, skipping upgrade: backcall in ./.conda/envs/sos/lib/python3.7/site-packages (from ipython->sos-notebook) (0.1.0)
Requirement already satisfied, skipping upgrade: prompt-toolkit<2.1.0,>=2.0.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from ipython->sos-notebook) (2.0.9)
Requirement already satisfied, skipping upgrade: jedi>=0.10 in ./.conda/envs/sos/lib/python3.7/site-packages (from ipython->sos-notebook) (0.14.0)
Requirement already satisfied, skipping upgrade: pickleshare in ./.conda/envs/sos/lib/python3.7/site-packages (from ipython->sos-notebook) (0.7.5)
Requirement already satisfied, skipping upgrade: setuptools>=18.5 in ./.conda/envs/sos/lib/python3.7/site-packages (from ipython->sos-notebook) (41.0.1)
Requirement already satisfied, skipping upgrade: pyarrow>=0.4.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from feather-format->sos-r) (0.13.0)
Requirement already satisfied, skipping upgrade: attrs>=17.4.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->sos) (19.1.0)
Requirement already satisfied, skipping upgrade: pyrsistent>=0.14.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->sos) (0.15.2)
Requirement already satisfied, skipping upgrade: webencodings in ./.conda/envs/sos/lib/python3.7/site-packages (from bleach->nbconvert>=5.1.1->sos-notebook) (0.5.1)
Requirement already satisfied, skipping upgrade: wcwidth in ./.conda/envs/sos/lib/python3.7/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->ipython->sos-notebook) (0.1.7)
Requirement already satisfied, skipping upgrade: parso>=0.3.0 in ./.conda/envs/sos/lib/python3.7/site-packages (from jedi>=0.10->ipython->sos-notebook) (0.5.0)

  • When I launch the notebook and open a new SoS kernel I get this log from the terminal:
START ./.local/share/jupyter/runtime/nbserver-131397-open.html"
Gtk-Message: Failed to load module "canberra-gtk-module"
[I 19:09:28.744 NotebookApp] Creating new notebook in 
./.conda/envs/sos/lib/python3.7/site-packages/jupyter_client/connect.py:163: RuntimeWarning: Failed to set sticky bit on './.local/share/jupyter/runtime/kernel-8cb639f4-49d0-4ffc-bdb0-f93bcd434e89.json': [Errno 22] Invalid argument: './.local/share/jupyter/runtime/kernel-8cb639f4-49d0-4ffc-bdb0-f93bcd434e89.json'
Probably not a big deal, but runtime files may be cleaned up periodically.
  RuntimeWarning,
[I 19:09:30.226 NotebookApp] Kernel started: 8cb639f4-49d0-4ffc-bdb0-f93bcd434e89
[W 19:09:30.290 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20190701190912 (::1) 14.70ms referer=http://localhost:8889/notebooks/Untitled.ipynb?kernel_name=sos
./.conda/envs/sos/lib/python3.7/site-packages/jupyter_client/connect.py:163: RuntimeWarning: Failed to set sticky bit on './.local/share/jupyter/runtime/kernel-8cb639f4-49d0-4ffc-bdb0-f93bcd434e89.json': [Errno 22] Invalid argument: './.local/share/jupyter/runtime/kernel-8cb639f4-49d0-4ffc-bdb0-f93bcd434e89.json'
Probably not a big deal, but runtime files may be cleaned up periodically.
  RuntimeWarning,
[I 19:09:32.299 NotebookApp] Adapting to protocol v5.1 for kernel 8cb639f4-49d0-4ffc-bdb0-f93bcd434e89
[W 19:09:32.384 NotebookApp] 404 GET /static/components/codemirror/mode/sos/sos.js?v=20190701190912 (::1) 2.47ms referer=http://localhost:8889/notebooks/Untitled.ipynb?kernel_name=sos

  • When I open from the console I see no error message.

@BoPeng
Copy link
Contributor

BoPeng commented Jul 1, 2019

@gaow You are on linux, right? Do you notice anything suspicious?

@gaow
Copy link
Member

gaow commented Jul 1, 2019

It works for me as always,

2019-07-01-13-04-15_scrot

Terminal output of jupyter notebook reads alright:

[GW] jupyter notebook
[I 13:03:56.974 NotebookApp] The port 8888 is already in use, trying another port.
[I 13:03:56.974 NotebookApp] The port 8889 is already in use, trying another port.
[I 13:03:56.974 NotebookApp] The port 8890 is already in use, trying another port.
[I 13:03:56.991 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.0
[I 13:03:57.036 NotebookApp] JupyterLab extension loaded from /opt/miniconda3/lib/python3.6/site-packages/jupyterlab
[I 13:03:57.036 NotebookApp] JupyterLab application directory is /opt/miniconda3/share/jupyter/lab
[I 13:03:57.137 NotebookApp] Serving notebooks from local directory: /home/gaow/Documents/GIT/software/mmbr/inst/prototypes
[I 13:03:57.137 NotebookApp] The Jupyter Notebook is running at:
[I 13:03:57.137 NotebookApp] http://localhost:8891/?token=51a570ca862b7f42262acb570d9ea8430f97fb0602a027d7
[I 13:03:57.137 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 13:03:57.137 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8891/?token=51a570ca862b7f42262acb570d9ea8430f97fb0602a027d7
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
[I 13:03:57.391 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[19460:19478:0701/130357.430556:ERROR:browser_process_sub_thread.cc(217)] Waited 5 ms for network service
Opening in existing browser session.
[I 13:04:00.680 NotebookApp] Creating new notebook in 
[I 13:04:01.458 NotebookApp] Kernel started: 68dc5525-9844-4c0d-844a-5fd7c484639b



I'm on Debian 9.

@BoPeng
Copy link
Contributor

BoPeng commented Jul 1, 2019

It appears that kernel.js is not executed at all, otherwise there should be some error message for the execution of kernel.js. What do you see in /home/.local/share/jupyter/kernels/sos? Could you try to get jupyterlab working? JupyterLab has recently been released and you can install sos from the package manager.

@BoPeng
Copy link
Contributor

BoPeng commented Jul 2, 2019

ok, I found a Ubuntu 18.04 VM with conda 3.6, ran

conda create -n test_sos python=3.7
conda activate test_sos
pip install -U sos sos-notebook  sos-python sos-bash bash_kernel
python -m bash_kernel.install
python -m sos_notebook.install

Now I have kernels

$ jupyter kernelspec list
Available kernels:
  bash         /home/bpeng1/.local/share/jupyter/kernels/bash
  sos          /home/bpeng1/.local/share/jupyter/kernels/sos
  python3      /home/bpeng1/anaconda3/envs/test_sos/share/jupyter/kernels/python3

And sos notebook runs fine in firefox, with console output

$ jupyter notebook
[I 20:30:58.915 NotebookApp] Writing notebook server cookie secret to /home/bpeng1/.local/share/jupyter/runtime/notebook_cookie_secret
[I 20:30:59.104 NotebookApp] Serving notebooks from local directory: /home/bpeng1
[I 20:30:59.104 NotebookApp] The Jupyter Notebook is running at:
[I 20:30:59.104 NotebookApp] http://localhost:8888/?token=6deb6efc524ba0fc4a974cf7a008f9f430a46b98cc34a561
[I 20:30:59.104 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 20:30:59.165 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/bpeng1/.local/share/jupyter/runtime/nbserver-3124-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=6deb6efc524ba0fc4a974cf7a008f9f430a46b98cc34a561
[I 20:31:06.615 NotebookApp] Creating new notebook in 
[I 20:31:08.273 NotebookApp] Kernel started: 6dae3e2d-f920-47bc-a42a-ab2342bcb120
[W 20:31:08.323 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20190701203058 (127.0.0.1) 24.00ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=sos
[I 20:31:09.415 NotebookApp] Adapting to protocol v5.1 for kernel 6dae3e2d-f920-47bc-a42a-ab2342bcb120
[I 20:33:08.284 NotebookApp] Saving file at /Untitled.ipynb
[I 20:36:04.888 NotebookApp] 302 GET /notebooks/Untitled.ipynb?kernel_name=sos (127.0.0.1) 0.64ms

with something like the following in the browser console for sos

panel created kernel.js:1687:5
panel rendered kernel.js:1724:5
mimebundle missing metadata 
Object { output_type: "display_data", data: {…}, metadata: {} }
outputarea.js:293
display panel kernel.js:1818:5
Kernel: kernel_connected (a2fecde4-4c78-418a-854a-643f8e551a12) kernel.js:103
sos comm registered kernel.js:1253:5
kernel list updated
kernel.js:1042:9
Kernel: kernel_ready (a2fecde4-4c78-418a-854a-643f8e551a12) kernel.js:103


I do not know what is going on on your side. Perhaps there is something special about your browser? Do you have some special plugin, or jupyter extension that have blocked kernel.js?

@ADGM
Copy link
Author

ADGM commented Jul 2, 2019

sos directory in jupyter shows kernel.js

(sos) [~]$ ls .local/share/jupyter/kernels/sos
kernel.js  kernel.json  logo-64x64.png


When I open a console for sos this is all that I get:
image


I can't install sos as jupyterlab extension because of unmet installation requirements; I can't upgrade jupyterlab because it is installed in a shared directory in our cluster, which I don't have write permissions for--I forgot to say that I am working in a cluster and not locally, so I am actually on CentOS 7 and not Ubuntu.

Extension Installation Error
An error occurred installing transient-display-data.

Error message:

No version of transient-display-data could be found that is compatible with the current version of JupyterLab. However, it seems to support a new version of JupyterLab. Consider upgrading JupyterLab.

Conflicting Dependencies:
JupyterLab              Extension        Package
>=0.19.1 <0.20.0        >=1.0.0-alpha.3 <2.0.0@jupyterlab/application
>=0.19.1 <0.20.0        >=1.0.0-alpha.3 <2.0.0@jupyterlab/apputils
>=0.19.1 <0.20.0        >=1.0.0-alpha.3 <2.0.0@jupyterlab/console
>=0.19.2 <0.20.0        >=1.0.0-alpha.3 <2.0.0@jupyterlab/notebook


When I launch the classic notebook interface the dropdown box appears:
image

I think that will do for now. :-)

I will also try doing a local install of jupyter and see if the problem persists. Thank you for the help, I love your notebook!

@BoPeng
Copy link
Contributor

BoPeng commented Jul 2, 2019

I do not know what you did to resolve the problem but I am glad that sos notebook works for you now.

@BoPeng BoPeng closed this as completed Jul 2, 2019
@gaow
Copy link
Member

gaow commented Aug 29, 2023

We have this issue with Jupyter Lab recently -- the dropdown menu does not show in Jupyter Lab although it seems to work with Jupyter Notebook. The developer's console says:

image

Here are our versions:

  jupyter-lsp                        2.2.0         pyhd8ed1ab_0         conda-forge
  jupyter-server-mathjax             0.2.6         pyh5bfe37b_1         conda-forge
  jupyter_client                     7.4.9         pyhd8ed1ab_0         conda-forge
  jupyter_contrib_core               0.4.0         pyhd8ed1ab_0         conda-forge
  jupyter_contrib_nbextensions       0.7.0         pyhd8ed1ab_0         conda-forge
  jupyter_core                       5.3.1         py310hff52083_0      conda-forge
  jupyter_events                     0.7.0         pyhd8ed1ab_2         conda-forge
  jupyter_highlight_selected_word    0.2.0         py310hff52083_1005   conda-forge
  jupyter_latex_envs                 1.4.6         pyhd8ed1ab_1002      conda-forge
  jupyter_nbextensions_configurator  0.6.1         pyhd8ed1ab_0         conda-forge
  jupyter_server                     2.7.1         pyhd8ed1ab_0         conda-forge
  jupyter_server_terminals           0.4.4         pyhd8ed1ab_1         conda-forge
  jupyterlab                         4.0.5         pyhd8ed1ab_0         conda-forge
  jupyterlab-transient-display-data  0.4.3         pyhc268e32_0         conda-forge
  jupyterlab_pygments                0.2.2         pyhd8ed1ab_0         conda-forge
  jupyterlab_server                  2.24.0        pyhd8ed1ab_0         conda-forge
  jupyterlab-sos                     0.8.8         ha770c72_0           conda-forge
  jupyterlab_sos                     0.8.8         pyh76afe40_0         conda-forge
  sos                                0.24.1        pyhd8ed1ab_0         conda-forge
  sos-bash                           0.20.0        py_0                 conda-forge
  sos-notebook                       0.24.0        py310hff52083_0      conda-forge
  sos-pbs                            0.20.8        py_0                 conda-forge
  sos-python                         0.18.4        py_0                 conda-forge
  sos-r                              0.19.6        py_0                 conda-forge
  notebook                           6.5.5         pyha770c72_0         conda-forge
  notebook-shim                      0.2.3         pyhd8ed1ab_0         conda-forge

Basically we are on the latest versions of SoS related modules. @BoPeng i wonder if you bring everything to the latest version, can you reproduce the problem with Jupyter Lab?

@gaow gaow reopened this Aug 29, 2023
@BoPeng
Copy link
Contributor

BoPeng commented Aug 29, 2023

This is a known issue for jupyterlab 4. It has some api change that I have not had time to investigate.

@BoPeng
Copy link
Contributor

BoPeng commented Aug 29, 2023

I have a deadline for this Thursday but can work on this afterwards. You can downgrade jupyterlab for now if you need sos to work now.

@gaow
Copy link
Member

gaow commented Aug 29, 2023

Thank you @BoPeng great to know that you know the source of the problem. I'll try myself for Jupyter Lab 3.x if it works i'll tell my colleagues to use their discretion on this -- either wait a bit or downgrade. Thanks for your help!

@BoPeng
Copy link
Contributor

BoPeng commented Sep 25, 2023

JLab 4.x is now supported, although syntax highlighting is still pending.

@Baboon61
Copy link

As this issue is not closed, I am reporting the same issue as OP on jupyter lab and notebook.

I am on an HPC, tunelling the jupyter instance on my workstation to open the URL in my workstation Firefox browser. I also have the issue on Google Chrome.

The HPC is on CentOS : AlmaLinux release 8.9
Conda : conda 23.1.0

conda create -n test_sos python=3.11
conda activate test_sos
pip install -U sos sos-notebook sos-python sos-bash bash_kernel
python -m bash_kernel.install
python -m sos_notebook.install
(test_sos) [bastien@XXXX04 ~]$ pip list
Package                   Version
------------------------- --------------
anyio                     4.3.0
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asttokens                 2.4.1
async-lru                 2.0.4
attrs                     23.2.0
Babel                     2.15.0
bash_kernel               0.9.3
beautifulsoup4            4.12.3
bleach                    6.1.0
certifi                   2024.2.2
cffi                      1.16.0
charset-normalizer        3.3.2
comm                      0.2.2
debugpy                   1.8.1
decorator                 5.1.1
defusedxml                0.7.1
Deprecated                1.2.14
executing                 2.0.1
fasteners                 0.19
fastjsonschema            2.19.1
fqdn                      1.5.1
future                    0.18.3
graphtools                1.5.3
h11                       0.14.0
httpcore                  1.0.5
httpx                     0.27.0
idna                      3.7
ipykernel                 6.29.4
ipython                   8.24.0
isoduration               20.11.0
jedi                      0.19.1
Jinja2                    3.1.4
joblib                    1.3.2
json5                     0.9.25
jsonpointer               2.4
jsonschema                4.22.0
jsonschema-specifications 2023.12.1
jupyter_client            8.6.1
jupyter_core              5.7.2
jupyter-events            0.10.0
jupyter-lsp               2.2.5
jupyter_server            2.14.0
jupyter_server_terminals  0.5.3
jupyterlab                4.1.8
jupyterlab_pygments       0.3.0
jupyterlab_server         2.27.1
magic-impute              3.0.0
MarkupSafe                2.1.5
matplotlib-inline         0.1.7
mistune                   3.0.2
nbclient                  0.10.0
nbconvert                 7.16.4
nbformat                  5.10.4
nest-asyncio              1.6.0
networkx                  3.3
notebook                  7.1.3
notebook_shim             0.2.4
numpy                     1.26.4
overrides                 7.7.0
packaging                 24.0
pandas                    2.0.3
pandocfilters             1.5.1
parso                     0.8.4
pexpect                   4.9.0
pip                       24.0
platformdirs              4.2.1
prometheus_client         0.20.0
prompt-toolkit            3.0.43
psutil                    5.9.8
ptyprocess                0.7.0
pure-eval                 0.2.2
pycparser                 2.22
pydot                     2.0.0
pydotplus                 2.0.2
Pygments                  2.18.0
PyGSP                     0.5.1
pyparsing                 3.1.2
python-dateutil           2.9.0.post0
python-json-logger        2.0.7
pytz                      2023.3.post1
PyYAML                    6.0.1
pyzmq                     26.0.3
referencing               0.35.1
requests                  2.31.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.18.1
scikit-learn              1.3.2
scipy                     1.11.4
scprep                    1.2.3
Send2Trash                1.8.3
setuptools                69.5.1
six                       1.16.0
sniffio                   1.3.1
sos                       0.25.1
sos-bash                  0.21.0
sos-notebook              0.24.4
sos-python                0.20.2
soupsieve                 2.5
stack-data                0.6.3
tabulate                  0.9.0
tasklogger                1.2.0
terminado                 0.18.1
threadpoolctl             3.2.0
tinycss2                  1.3.0
tornado                   6.4
tqdm                      4.66.4
traitlets                 5.14.3
types-python-dateutil     2.9.0.20240316
typing_extensions         4.11.0
tzdata                    2023.3
uri-template              1.3.0
urllib3                   2.2.1
wcwidth                   0.2.13
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.8.0
wheel                     0.43.0
wrapt                     1.16.0
xxhash                    3.4.1
(test_sos) [bastien@XXXX04 ~]$ jupyter kernelspec list
Available kernels:
  python3    /home/bastien/miniconda3/envs/test_sos/share/jupyter/kernels/python3
  bash       /home/bastien/.local/share/jupyter/kernels/bash
  sos        /home/bastien/.local/share/jupyter/kernels/sos
(test_sos) [bastien@XXXX04 ~]$ /home/bastien/miniconda3/envs/test_sos/bin/jupyter notebook --port 9998
[I 2024-05-13 16:32:49.034 ServerApp] Extension package jupyter_lsp took 0.1541s to import
[I 2024-05-13 16:32:49.640 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-05-13 16:32:49.667 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-05-13 16:32:49.692 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-05-13 16:32:49.718 ServerApp] notebook | extension was successfully linked.
[I 2024-05-13 16:32:51.745 ServerApp] ipyparallel.nbextension | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2024-05-13 16:32:51.745 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-05-13 16:32:51.944 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-05-13 16:32:51.947 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-05-13 16:32:51.953 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-05-13 16:32:51.980 LabApp] JupyterLab extension loaded from /home/bastien/miniconda3/envs/test_sos/lib/python3.11/site-packages/jupyterlab
[I 2024-05-13 16:32:51.980 LabApp] JupyterLab application directory is /home/bastien/miniconda3/envs/test_sos/share/jupyter/lab
[I 2024-05-13 16:32:51.982 LabApp] Extension Manager is 'pypi'.
[I 2024-05-13 16:32:51.995 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-05-13 16:32:52.018 ServerApp] notebook | extension was successfully loaded.
[I 2024-05-13 16:32:52.018 ServerApp] Serving notebooks from local directory: /home/bastien
[I 2024-05-13 16:32:52.019 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-05-13 16:32:52.019 ServerApp] http://localhost:9998/tree?token=ce9bb03c4c4168fadf19bfe01e2c84a512deaede8c6df17c
[I 2024-05-13 16:32:52.019 ServerApp]     http://127.0.0.1:9998/tree?token=ce9bb03c4c4168fadf19bfe01e2c84a512deaede8c6df17c
[I 2024-05-13 16:32:52.019 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2024-05-13 16:32:52.064 ServerApp] No web browser found: Error('could not locate runnable browser').
[C 2024-05-13 16:32:52.064 ServerApp] 
    
    To access the server, open this file in a browser:
        file:///home/bastien/.local/share/jupyter/runtime/jpserver-3791090-open.html
    Or copy and paste one of these URLs:
        http://localhost:9998/tree?token=ce9bb03c4c4168fadf19bfe01e2c84a512deaede8c6df17c
        http://127.0.0.1:9998/tree?token=ce9bb03c4c4168fadf19bfe01e2c84a512deaede8c6df17c
[I 2024-05-13 16:32:52.734 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[I 2024-05-13 16:33:40.419 ServerApp] Kernel started: 23021f97-d140-49f7-ac06-d37e707089dd
/home/bastien/miniconda3/envs/test_sos/lib/python3.11/site-packages/sos_notebook/kernel.py:20: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
[I 2024-05-13 16:33:51.154 ServerApp] Connecting to kernel 23021f97-d140-49f7-ac06-d37e707089dd.
[I 2024-05-13 16:33:51.166 ServerApp] Connecting to kernel 23021f97-d140-49f7-ac06-d37e707089dd.
[I 2024-05-13 16:33:51.175 ServerApp] Connecting to kernel 23021f97-d140-49f7-ac06-d37e707089dd.
[I 2024-05-13 16:35:31.400 ServerApp] Saving file at /Untitled.ipynb

The notebook seems to work smoothly except the cell kernel dropdown that does not show up...

On the developper console of the browser I can see this
image

Python and bash are detected to be set as main kernel and can be selected as such, but it is not possible to assign them to any specific cell as the dropdown is not available. Thanks

@BoPeng
Copy link
Contributor

BoPeng commented May 13, 2024

Can you try to switch to jupyterlab? I apologize but the notebook interface is deprecating and so it our support for sos-notebook.

@Baboon61
Copy link

Baboon61 commented May 13, 2024

I get a nodejs warning, but nothing more

(test_sos) [bastien@XXXX04 ~]$ /home/bastien/miniconda3/envs/test_sos/bin/jupyter lab --port 9998
[I 2024-05-13 17:14:44.307 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-05-13 17:14:44.338 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-05-13 17:14:44.369 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-05-13 17:14:44.399 ServerApp] notebook | extension was successfully linked.
[I 2024-05-13 17:14:46.807 ServerApp] ipyparallel.nbextension | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2024-05-13 17:14:46.807 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-05-13 17:14:47.016 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-05-13 17:14:47.018 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-05-13 17:14:47.025 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-05-13 17:14:47.051 LabApp] JupyterLab extension loaded from /home/bastien/miniconda3/envs/test_sos/lib/python3.11/site-packages/jupyterlab
[I 2024-05-13 17:14:47.051 LabApp] JupyterLab application directory is /home/bastien/miniconda3/envs/test_sos/share/jupyter/lab
[I 2024-05-13 17:14:47.053 LabApp] Extension Manager is 'pypi'.
[I 2024-05-13 17:14:47.067 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-05-13 17:14:47.092 ServerApp] notebook | extension was successfully loaded.
[I 2024-05-13 17:14:47.092 ServerApp] Serving notebooks from local directory: /home/bastien
[I 2024-05-13 17:14:47.092 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-05-13 17:14:47.092 ServerApp] http://localhost:9998/lab?token=eca8b85023fa7945d3d5995f977aa38a8f9fe6ac8c1080be
[I 2024-05-13 17:14:47.092 ServerApp]     http://127.0.0.1:9998/lab?token=eca8b85023fa7945d3d5995f977aa38a8f9fe6ac8c1080be
[I 2024-05-13 17:14:47.092 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2024-05-13 17:14:47.140 ServerApp] No web browser found: Error('could not locate runnable browser').
[C 2024-05-13 17:14:47.140 ServerApp] 
    
    To access the server, open this file in a browser:
        file:///home/bastien/.local/share/jupyter/runtime/jpserver-3792936-open.html
    Or copy and paste one of these URLs:
        http://localhost:9998/lab?token=eca8b85023fa7945d3d5995f977aa38a8f9fe6ac8c1080be
        http://127.0.0.1:9998/lab?token=eca8b85023fa7945d3d5995f977aa38a8f9fe6ac8c1080be
[I 2024-05-13 17:14:47.898 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[W 2024-05-13 17:15:05.877 LabApp] Could not determine jupyterlab build status without nodejs
[I 2024-05-13 17:15:09.352 ServerApp] Kernel started: 062457e5-37ed-4df7-af6a-a73db393d146
/home/bastien/miniconda3/envs/test_sos/lib/python3.11/site-packages/sos_notebook/kernel.py:20: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
[I 2024-05-13 17:15:22.103 ServerApp] Connecting to kernel 062457e5-37ed-4df7-af6a-a73db393d146.
[I 2024-05-13 17:15:22.115 ServerApp] Connecting to kernel 062457e5-37ed-4df7-af6a-a73db393d146.
[I 2024-05-13 17:15:22.126 ServerApp] Connecting to kernel 062457e5-37ed-4df7-af6a-a73db393d146.

image

EDIT :

Just installed nodejs with :
conda install -c conda-forge nodejs

The warning got removed but still the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants