You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update: it looks like the issue appears when the virtual environment is upgraded from notebook 7.0.x to 7.1.x, and requires a "Empty Cache and Hard Reload" for the widgets to work. I don't know if the issue can be considered closed, or there should be a work item for ipywidgets / notebook to prevent it from happening in the future.
Input widgets (e.g., FloatText) do not appear to work with notebook v7.1.0 or later.
After the widgets are rendered, changing the value of a input widget by typing a new value would:
make the cell display disappear
the code cell is changed to Markdown type, with the first line prepended with #### .
some javascript errors in developer console (see below)
Related:
After the widgets are rendered, if one tries to change the value of the (numeric) input widget with up/down arrow keys, the value is not changed. Instead, the focus is shifted to the cell above / below.
If one tries to change the value of the input widget with mouse wheel (or click the up/down arrow next to the input box), everything works (the value is updated, and the plot is updated accordingly).
$[I 2024-04-19 12:54:03.377 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-04-19 12:54:03.393 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-04-19 12:54:03.409 ServerApp] jupyterlab | extension was successfully linked.
C:\Users\XYZ\.jupyter\jupyter_notebook_config.py:266: SyntaxWarning: invalid escape sequence '\d'
c.NotebookApp.notebook_dir = "C:\dev\_juypter"
[W 2024-04-19 12:54:03.415 JupyterNotebookApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2024-04-19 12:54:03.415 JupyterNotebookApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2024-04-19 12:54:03.420 ServerApp] notebook_dir is deprecated, use root_dir
[I 2024-04-19 12:54:03.420 ServerApp] notebook | extension was successfully linked.
[W 2024-04-19 12:54:03.843 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 "C:\pkg\_winNonPortables\miniforge3\envs\ipywidgets-test\Lib\site-packages\jupyter_server\extension\manager.py", line 323, in add_extension
extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\pkg\_winNonPortables\miniforge3\envs\ipywidgets-test\Lib\site-packages\jupyter_server\extension\manager.py", line 187, in __init__
self._load_metadata()
File "C:\pkg\_winNonPortables\miniforge3\envs\ipywidgets-test\Lib\site-packages\jupyter_server\extension\manager.py", line 202, 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 2024-04-19 12:54:03.843 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-04-19 12:54:03.890 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-04-19 12:54:03.890 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-04-19 12:54:03.890 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-04-19 12:54:03.906 LabApp] JupyterLab extension loaded from C:\pkg\_winNonPortables\miniforge3\envs\ipywidgets-test\Lib\site-packages\jupyterlab
[I 2024-04-19 12:54:03.906 LabApp] JupyterLab application directory is C:\pkg\_winNonPortables\miniforge3\envs\ipywidgets-test\share\jupyter\lab
[I 2024-04-19 12:54:03.906 LabApp] Extension Manager is 'pypi'.
[I 2024-04-19 12:54:04.260 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-04-19 12:54:04.260 ServerApp] notebook | extension was successfully loaded.
[I 2024-04-19 12:54:04.260 ServerApp] The port 8888 is already in use, trying another port.
[I 2024-04-19 12:54:04.260 ServerApp] Serving notebooks from local directory: C:\dev\_juypter
[I 2024-04-19 12:54:04.260 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-04-19 12:54:04.260 ServerApp] http://localhost:8889/tree?token=954b35e9ed9c2d4f57d1204b06b5dd4cdfbfbf238fe7794c
[I 2024-04-19 12:54:04.260 ServerApp] http://127.0.0.1:8889/tree?token=954b35e9ed9c2d4f57d1204b06b5dd4cdfbfbf238fe7794c
[I 2024-04-19 12:54:04.260 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2024-04-19 12:54:04.323 ServerApp]
To access the server, open this file in a browser:
file:///C:/Users/XYZ/AppData/Roaming/jupyter/runtime/jpserver-24828-open.html
Or copy and paste one of these URLs:
http://localhost:8889/tree?token=954b35e9ed9c2d4f57d1204b06b5dd4cdfbfbf238fe7794c
http://127.0.0.1:8889/tree?token=954b35e9ed9c2d4f57d1204b06b5dd4cdfbfbf238fe7794c
[I 2024-04-19 12:54:04.492 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-04-19 12:54:11.947 ServerApp] Saving file at /PH_TESS_LightCurveViewer/Untitled_ipywidgets_notebook_compat_test1.ipynb
[I 2024-04-19 12:54:19.856 ServerApp] Kernel started: b1512e1e-e0cd-496c-b895-0235ba2f5326
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 2024-04-19 12:54:21.402 ServerApp] Connecting to kernel b1512e1e-e0cd-496c-b895-0235ba2f5326.
Browser Output (after the interactive widgets are rendered, before changing any input widget values)
TypeError: (0 , s.CommonMfracMixin) is not a function
at 32547 (7369.bundle.js:1:44756)
at v (bundle.js:1:516)
at 44383 (7369.bundle.js:1:18916)
at v (bundle.js:1:516)
at 46002 (7369.bundle.js:1:18507)
at v (bundle.js:1:516)
at 57369 (7369.bundle.js:1:4557)
at v (bundle.js:1:516)
at v.t (bundle.js:1:753)
at async Promise.all (index 1)
Browser Output (after changing the value of the input widget)
The text was updated successfully, but these errors were encountered:
orionlee
changed the title
interactive widgets do not appear to work with notebook 7.1.x
interactive widgets do not appear to work with notebook 7.1.x : input widget values cannot be changed by keyboard inputs
Apr 19, 2024
Update: The error can be reproduced in the following simpler setup, displaying a FloatText only.
The error also occurs if Text is used instead of FloatText.
%matplotlibinlinedefcreate_widgets(initial_t0):
# the controlt0=widgets.FloatText(
value=initial_t0,
step=0.1,
description=r"t0",
)
display(t0)
create_widgets(2);
orionlee
changed the title
interactive widgets do not appear to work with notebook 7.1.x : input widget values cannot be changed by keyboard inputs
input widget values cannot be changed by keyboard inputs with notebook 7.1.x Apr 19, 2024
Description
Update: it looks like the issue appears when the virtual environment is upgraded from notebook
7.0.x
to7.1.x
, and requires a "Empty Cache and Hard Reload" for the widgets to work. I don't know if the issue can be considered closed, or there should be a work item for ipywidgets / notebook to prevent it from happening in the future.Input widgets (e.g.,
FloatText
) do not appear to work with notebook v7.1.0 or later.After the widgets are rendered, changing the value of a input widget by typing a new value would:
####
.Related:
Reproduce
With ipywidgets 8.x and notebook 7.1.x:
A screen recording:
Example notebook
Expected behavior
The interactive widgets should work.
(The same codes work with
notebook 7.0.6
, but not 7.1.x)Context
Troubleshoot Output
Command Line Output
Browser Output (after the interactive widgets are rendered, before changing any input widget values)
Browser Output (after changing the value of the input widget)
The text was updated successfully, but these errors were encountered: