jupyterlab-contrib/rise

Cells not executable in slideshow mode

Opened this issue · 11 comments

Description

After installing jupyterlab-rise, I can see the meta data tags for choosing which kind of slide. However, in slideshow view the slides are not executable, even though they are in Jupyter notebook with RISE

Reproduce

  1. Create a Jupyter notebook in Jupyter Lab that contains executable Python code.
  2. Using Common Tools, assign the cells to be Slides
  3. Invoke slideshow mode
  4. In slideshow mode edit code and execute cell

Expected behavior

The output of the cell should change based on what has been entered, but it does not.

Context

  • Python package version:
  • Python 3.9.13

Name: jupyterlab
Version: 4.0.5
Summary: JupyterLab computational environment

  • Extension version:

  • Name: jupyterlab_rise
    Version: 0.40.0
    Summary: RISE: "Live" Reveal.js JupyterLab Slideshow extension.

  • Operating System and its version: MacOS Ventura 13.5.1. Apple M2 Max

  • Browser and its version:
    Safari 16.6 or Jupyterlab desktop 4.0.5

Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
qmcpy) fredhickernell@Freds-MacBook-Pro QMCSoftware % jupyter lab [I 2023-08-20 16:49:20.259 ServerApp] Package jupyterlab took 0.0000s to import [I 2023-08-20 16:49:20.267 ServerApp] Package jupyter_lsp took 0.0083s to import [W 2023-08-20 16:49:20.267 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [I 2023-08-20 16:49:20.269 ServerApp] Package jupyter_server_fileid took 0.0013s to import [I 2023-08-20 16:49:20.274 ServerApp] Package jupyter_server_terminals took 0.0049s to import [I 2023-08-20 16:49:20.288 ServerApp] Package jupyter_server_ydoc took 0.0135s to import [I 2023-08-20 16:49:20.289 ServerApp] Package jupyterlab_rise took 0.0014s to import [I 2023-08-20 16:49:20.290 ServerApp] Package nbclassic took 0.0004s to import [W 2023-08-20 16:49:20.291 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [I 2023-08-20 16:49:20.291 ServerApp] Package notebook_shim took 0.0000s to import [W 2023-08-20 16:49:20.291 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [I 2023-08-20 16:49:20.291 ServerApp] jupyter_lsp | extension was successfully linked. [I 2023-08-20 16:49:20.293 ServerApp] jupyter_server_fileid | extension was successfully linked. [I 2023-08-20 16:49:20.295 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2023-08-20 16:49:20.296 ServerApp] jupyter_server_ydoc | extension was successfully linked. [I 2023-08-20 16:49:20.299 ServerApp] jupyterlab | extension was successfully linked. [I 2023-08-20 16:49:20.301 ServerApp] jupyterlab_rise | extension was successfully linked. [I 2023-08-20 16:49:20.302 ServerApp] nbclassic | extension was successfully linked. [I 2023-08-20 16:49:20.440 ServerApp] notebook_shim | extension was successfully linked. [I 2023-08-20 16:49:20.490 ServerApp] notebook_shim | extension was successfully loaded. [I 2023-08-20 16:49:20.492 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2023-08-20 16:49:20.492 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager [I 2023-08-20 16:49:20.492 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /Users/fredhickernell/SoftwareRepositories/QMCSoftware [I 2023-08-20 16:49:20.492 FileIdExtension] ArbitraryFileIdManager : Configured database path: /Users/fredhickernell/Library/Jupyter/file_id_manager.db [I 2023-08-20 16:49:20.493 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file. [I 2023-08-20 16:49:20.493 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE [I 2023-08-20 16:49:20.493 FileIdExtension] Attached event listeners. [I 2023-08-20 16:49:20.493 ServerApp] jupyter_server_fileid | extension was successfully loaded. [I 2023-08-20 16:49:20.494 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2023-08-20 16:49:20.494 ServerApp] jupyter_server_ydoc | extension was successfully loaded. [I 2023-08-20 16:49:20.494 LabApp] JupyterLab extension loaded from /Users/fredhickernell/miniconda3/envs/qmcpy/lib/python3.9/site-packages/jupyterlab [I 2023-08-20 16:49:20.494 LabApp] JupyterLab application directory is /Users/fredhickernell/miniconda3/envs/qmcpy/share/jupyter/lab [I 2023-08-20 16:49:20.494 LabApp] Extension Manager is 'pypi'. [I 2023-08-20 16:49:20.496 ServerApp] jupyterlab | extension was successfully loaded. [I 2023-08-20 16:49:20.496 ServerApp] jupyterlab_rise | extension was successfully loaded.

| | | |_ __ | | | | ___
| || | ' / / _ | / -)
_/| ./_
,_,|____|
|_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-08-20 16:49:20.498 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-08-20 16:49:20.499 ServerApp] Serving notebooks from local directory: /Users/fredhickernell/SoftwareRepositories/QMCSoftware
[I 2023-08-20 16:49:20.499 ServerApp] Jupyter Server 2.5.0 is running at:
[I 2023-08-20 16:49:20.499 ServerApp] http://localhost:8888/lab?token=a1eae46522caa3410e2c86172877701381af7482dd20d07f
[I 2023-08-20 16:49:20.499 ServerApp] http://127.0.0.1:8888/lab?token=a1eae46522caa3410e2c86172877701381af7482dd20d07f
[I 2023-08-20 16:49:20.499 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-08-20 16:49:20.503 ServerApp]

To access the server, open this file in a browser:
    file:///Users/fredhickernell/Library/Jupyter/runtime/jpserver-31583-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/lab?token=a1eae46522caa3410e2c86172877701381af7482dd20d07f
    http://127.0.0.1:8888/lab?token=a1eae46522caa3410e2c86172877701381af7482dd20d07f

[I 2023-08-20 16:49:20.519 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 2023-08-20 16:49:23.417 LabApp] Could not determine jupyterlab build status without nodejs
[W 2023-08-20 16:49:23.819 ServerApp] Notebook demos/talk_paper_demos/Purdue_Talk_2023_March/Purdue_Talk_Figures.ipynb is not trusted
[I 2023-08-20 16:49:24.071 ServerApp] Kernel started: 5603f017-6677-4a14-a198-f4f4c047697a
[I 2023-08-20 16:49:24.483 ServerApp] Connecting to kernel 5603f017-6677-4a14-a198-f4f4c047697a.
[I 2023-08-20 16:49:24.485 ServerApp] Connecting to kernel 5603f017-6677-4a14-a198-f4f4c047697a.
[I 2023-08-20 16:49:24.485 ServerApp] Connecting to kernel 5603f017-6677-4a14-a198-f4f4c047697a.

Web Browser Output
Paste the output from your browser web console here.

Just as a data point: I did not manage to reproduce; with the same jupyterlab 4.0.5 and rise 0.40.0,
I can execute cells as expected.

Ubuntu 22.04, Firefox, Python 3.11.5

Ah wait, this could be related to #17: if a code cell already has content,
then that content is executed. But if there is no initial content, whatever
is typed in is ignored, and the cell is executed as an empty cell. Which
looks as if the cell had not been executed.

I can reproduce this.
Screencast from 2023-09-11 03:19:02 PM.webm

Try for yourself by running JupyterLab in the following docker image with command (and visit the URL in your browser):

docker run --rm -v $(pwd):/home/jovyan/work -p 8889:8889 ubcdsci/r-dsci-100-grading:18f638381ca6 jupyter lab --port 8889
jupyter_client                8.3.1
jupyter_core                  5.3.1
jupyter-events                0.7.0
jupyter-lsp                   2.2.0
jupyter_server                2.7.3
jupyter-server-mathjax        0.2.6
jupyter_server_terminals      0.4.4
jupyter-telemetry             0.1.0
jupyterhub                    4.0.2
jupyterlab                    4.0.5
jupyterlab_git                0.42.0
jupyterlab-pygments           0.2.2
jupyterlab_rise               0.40.0
jupyterlab_server             2.24.0
jupyterlab-widgets            3.0.8

Ah, I should have posted my response in #48 , which I think is more what is going on in my case.

To it looks as if the keyboard shortcut "shift-enter" does not longer execute the cell but navigates to the next slide.

I am having the same issue. The notebook seems to overrule the content in presentation mode, which does the following:

  • An empty cell in the notebook cannot be executed in presentation mode. This is what causes the issue stated above by @fiware-austria: execution has no effect and the next cell is entered.
  • A cell with content can be executed but changing the content in presentation mode will always produce the same output.

Maybe there is an issue with the separation of "Command Mode" and "Edit Mode"? The cells (in notebook view and presentation mode) are always marked blue but they should be green when in "Edit Mode", if I remember correctly. Also, the shortcuts seem to be "always on", e.g., when I wanted to type # Addition into a cell in presentation mode the speaker view opened when I typed 't'.

I had to downgrade to version 0.2.0 to get it working again. Maybe that helps!

Would be great to get this working, since it is one of the killer-features, that sets rise apart from other presentation tools.

I had to downgrade to version 0.2.0 to get it working again. Maybe that helps!

Would be great to get this working, since it is one of the killer-features, that sets rise apart from other presentation tools.

At our institution we used a combination of downgrading and opening the notebook in Nbclassic - not perfect but all functionalities work at the moment.

Just for information: I have been using lately JupyterLab-Deck. There remains a few caveats (JupyterLab 3.6 only, broken space / shift-space navigation with sublides, no conda package), but other than this it has done the job for me.

If your use case allows for JupyterLab 3, I found that cells appear to work normally and run with changes with JupyterLab 3.6.6 and RISE 0.3.0.

FWIW: after PR #62 was merged, I can now reliably edit and execute code in RISE slides.