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

No Cell Toolbar View; All slides end up on Same Page #45

Open
drscotthawley opened this issue Aug 28, 2023 · 3 comments
Open

No Cell Toolbar View; All slides end up on Same Page #45

drscotthawley opened this issue Aug 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@drscotthawley
Copy link

drscotthawley commented Aug 28, 2023

Description

This is a pair of issues together.

  1. There is no View > Cell Toolbar option as is expected in RISE
  2. Opening a saved RISE notebook file and selecting View > Render as Reveal Slideshow results in all cells that had been designated as slides opening on the same screen together, i.e. no slide divisions.

(3.) Re. point 1, There are no usage instructions to describe how to use this, differently from the original RISE.

Reproduce

I would have tried to use your examples/README.ipynb as an example but it refuses to load.

  1. Go to View.
  2. Try to click on Cell Toolbar
  3. Search README for any usage instructions or links to additional documentation
  4. Try to load examples/README.ipynb
  5. See error File Load Error for README.ipynb Unreadable Notebook: README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">

Alternatively,

  1. Try to load an existing .ipynb slideshow
  2. Go to View > Render as Reveal Slideshow
  3. See that separate slides are all appearing run together on one page.

Expected behavior

  • Some way of designating slides.
  • Documentation to describe differences from original RISE
  • Ability to render separate slides as separate slides

Context

  • Python package version:
    Results of conda list extension_name or pip show extension_name:
$ pip show extension_name
WARNING: Package(s) not found: extension_name
  • Extension version:

$ jupyter labextension list
JupyterLab v4.0.4
/Users/shawley/envs/blog/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled X (python, jupyterlab_pygments)
jupyterlab-rise v0.40.0 enabled OK (python, jupyterlab_rise)
jupyterlab-ipyflow v0.0.178 enabled X
jupyterlab-plotly v5.15.0 enabled X
@pyviz/jupyterlab_pyviz v2.3.1 enabled X (python, pyviz_comms)
@jupyter-notebook/lab-extension v7.0.2 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.8 enabled OK (python, jupyterlab_widgets)

The following extensions are outdated:
jupyterlab_pygments
jupyterlab-ipyflow
jupyterlab-plotly
@pyviz/jupyterlab_pyviz

Consider checking if an update is available for these packages.

  • Operating System and its version: MacOS 13.4.1
  • Browser and its version: Brave Version 1.56.20 Chromium: 115.0.5790.171
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
/slides$ jupyter notebook 
[I 2023-08-28 10:52:21.111 ServerApp] Package notebook took 0.0000s to import
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2023-08-28 10:52:21.388 ServerApp] Package ipyflow took 0.2769s to import
[I 2023-08-28 10:52:21.393 ServerApp] Package jupyter_lsp took 0.0051s to import
[W 2023-08-28 10:52:21.393 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-28 10:52:21.395 ServerApp] Package jupyter_server_terminals took 0.0016s to import
[I 2023-08-28 10:52:21.395 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-08-28 10:52:21.567 ServerApp] Package jupyterlab_rise took 0.0011s to import
[I 2023-08-28 10:52:21.568 ServerApp] Package nbclassic took 0.0010s to import
[W 2023-08-28 10:52:21.569 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-28 10:52:21.569 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-08-28 10:52:21.569 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-28 10:52:22.098 ServerApp] Package panel.io.jupyter_server_extension took 0.5284s to import
[I 2023-08-28 10:52:22.098 ServerApp] ipyflow | extension was successfully linked.
[I 2023-08-28 10:52:22.098 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-08-28 10:52:22.100 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-08-28 10:52:22.102 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-08-28 10:52:22.104 ServerApp] jupyterlab_rise | extension was successfully linked.
[I 2023-08-28 10:52:22.105 ServerApp] nbclassic | extension was successfully linked.
[I 2023-08-28 10:52:22.107 ServerApp] notebook | extension was successfully linked.
[W 2023-08-28 10:52:22.110 ServerApp] jupyter_nbextensions_configurator | error adding extension (enabled: True): The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
    Traceback (most recent call last):
      File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 319, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 183, in __init__
        self._load_metadata()
      File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 198, in _load_metadata
        raise ExtensionModuleNotFound(msg) from None
    jupyter_server.extension.utils.ExtensionModuleNotFound: The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
[I 2023-08-28 10:52:22.110 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-08-28 10:52:22.111 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
/Users/myusername/envs/blog/lib/python3.11/site-packages/traitlets/traitlets.py:1233: UserWarning: Overriding existing pre_save_hook (nbdev_clean_jupyter) with a new one (nbdev_clean_jupyter).
  return self.func(*args, **kwargs)
[I 2023-08-28 10:52:22.117 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-08-28 10:52:22.117 ServerApp] ipyflow | extension was successfully loaded.
[I 2023-08-28 10:52:22.118 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-08-28 10:52:22.118 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-08-28 10:52:22.119 LabApp] JupyterLab extension loaded from /Users/myusername/envs/blog/lib/python3.11/site-packages/jupyterlab
[I 2023-08-28 10:52:22.119 LabApp] JupyterLab application directory is /Users/myusername/envs/blog/share/jupyter/lab
[I 2023-08-28 10:52:22.119 LabApp] Extension Manager is 'pypi'.
[I 2023-08-28 10:52:22.120 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-08-28 10:52:22.121 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-28 10:52:22.122 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-08-28 10:52:22.123 ServerApp] notebook | extension was successfully loaded.
[I 2023-08-28 10:52:22.124 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.
[I 2023-08-28 10:52:22.124 ServerApp] The port 8888 is already in use, trying another port.
[I 2023-08-28 10:52:22.125 ServerApp] Serving notebooks from local directory: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides
[I 2023-08-28 10:52:22.125 ServerApp] Jupyter Server 2.7.0 is running at:
[I 2023-08-28 10:52:22.125 ServerApp] http://localhost:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198
[I 2023-08-28 10:52:22.125 ServerApp] http://127.0.0.1:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198
[I 2023-08-28 10:52:22.125 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-08-28 10:52:22.129 ServerApp]

To access the server, open this file in a browser:
    file:///Users/myusername/Library/Jupyter/runtime/jpserver-95878-open.html
Or copy and paste one of these URLs:
    http://localhost:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198
    http://127.0.0.1:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198

[I 2023-08-28 10:52:22.345 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-28 10:52:32.994 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237952904 (::1): Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">
[W 2023-08-28 10:52:32.994 ServerApp] wrote error: 'Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">'
Traceback (most recent call last):
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/tornado/web.py", line 1786, in _execute
result = await result
^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/handlers.py", line 121, in get
model = await ensure_async(
^^^^^^^^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_core/utils/init.py", line 182, in ensure_async
result = await obj
^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 889, in get
model = await self._notebook_model(path, content=content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 842, in _notebook_model
nb = await self._read_notebook(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/fileio.py", line 385, in _read_notebook
raise HTTPError(
tornado.web.HTTPError: HTTP 400: Bad Request (Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">)
[W 2023-08-28 10:52:32.996 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237952904 (e6894431b71d4e1881a74396ce7c5df3@::1) 10.37ms referer=http://localhost:8889/tree
[W 2023-08-28 10:52:34.422 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237954411 (::1): Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">
[W 2023-08-28 10:52:34.422 ServerApp] wrote error: 'Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">'
Traceback (most recent call last):
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/tornado/web.py", line 1786, in _execute
result = await result
^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/handlers.py", line 121, in get
model = await ensure_async(
^^^^^^^^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_core/utils/init.py", line 182, in ensure_async
result = await obj
^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 889, in get
model = await self._notebook_model(path, content=content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 842, in _notebook_model
nb = await self._read_notebook(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/fileio.py", line 385, in _read_notebook
raise HTTPError(
tornado.web.HTTPError: HTTP 400: Bad Request (Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">)
[W 2023-08-28 10:52:34.423 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237954411 (e6894431b71d4e1881a74396ce7c5df3@::1) 3.29ms referer=http://localhost:8889/notebooks/README.ipynb

Web Browser Output
Paste the output from your browser web console here.
@drscotthawley drscotthawley added the bug Something isn't working label Aug 28, 2023
@nthiery
Copy link
Contributor

nthiery commented Sep 1, 2023

Hi @drscotthawley,

  1. To edit the rise cell metadata, you can use the property inspector in the right jupyterlab toolbar. This is indeed deviates from the original rise in Jupyter notebook, but is consistent with how jupyterlab gives access to cell metadata for other
    purposes. Once you have discovered it, it's fairly natural.

  2. I did not manage to reproduce. My slides appear properly separated. Could you provide an example notebook, or a screencast?

As a heavy rise user, I am already grateful that something is starting to exist. But there is indeed still a long way to go, including for documentation.

@surfaceowl
Copy link

surfaceowl commented Sep 28, 2023

@drscotthawley -- same thing happened to me after creating a new notebook with versions below. The current version of RISE installs with the "slide type" attribute of each cell defaulted to null (actually it's "-"). As a result, all the cells appear on the same page when you run RISE. The trick is to 1) click on the icon of small gears for each notebook cell (see red arrow in image below), 2) look under "common tools" immediately to the left of the small gears, then 3) find the "slide type" drop down box and change it to "slide" (or whatever other choice is right for that cell.

The versions I used are:
jupyterlab==4.0.6
jupyterlab-rise==0.41.0



screenshot
image

@nthiery -- would be great to document maybe just on the Readme for now, since the interface is so different from older RISE versions running in notebook.




Here is result
image

@ibgp2
Copy link

ibgp2 commented Mar 29, 2024

@surfaceowl Thanks, your message helps a lot, because finding this menu isn't very natural!

Please also note some RISE shortcuts also works:

  • Shift-i, set a cell to "slide"
  • Shift-b, set a cell to "subslide"
  • Shift-g, set a cell to "fragment"

Note that if this cell is a "slide", Shift-i does not revert a cell to "-" (rise 5.7.1, jupyterlab_rise 0.42.0, jupyterlab 4.1.4).
I don't know whether there is a shortcut to set a cell to "-", so currently, I use the "gear" icon in the right panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants