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

Using --enable_nbextensions=True in v0.3.2 shows an error in console #1107

Open
mariobuikhuizen opened this issue Mar 8, 2022 · 27 comments
Open
Labels
bug Something isn't working

Comments

@mariobuikhuizen
Copy link
Member

Description

Using --enable_nbextensions=True in v0.3.2 shows an error in console:

ERROR:tornado.application:Uncaught exception in write_error
Traceback (most recent call last):
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 2576, in get
    self.absolute_path = self.validate_absolute_path(self.root, absolute_path)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 860, in validate_absolute_path
    raise web.HTTPError(404)
tornado.web.HTTPError: HTTP 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 1217, in send_error
    self.write_error(status_code, **kwargs)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 590, in write_error
    html = self.render_template("%s.html" % status_code, **ns)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 521, in render_template
    return template.render(**ns)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/404.html", line 1, in top-level template code
    {% extends "error.html" %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/error.html", line 1, in top-level template code
    {% extends "page.html" %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/lab/page.html", line 1, in top-level template code
    {%- extends 'voila/templates/base/page.html' -%}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/page.html", line 13, in top-level template code
    {% block stylesheets %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/lab/page.html", line 11, in block 'stylesheets'
    {{ include_css("static/index.css") }}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/utils.py", line 84, in from_obj
    if hasattr(obj, "jinja_pass_arg"):
jinja2.exceptions.UndefinedError: 'include_css' is undefined
WARNING:tornado.access:404 GET /voila/nbextensions/execute_time/ExecuteTime.js (::1) 7.47ms
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
[IPKernelApp] WARNING | No such comm: ad7585d1-76b0-4c91-8d89-371241129803

Reproduce

  1. mamba create -n voila32 -c conda-forge voila=0.3.2 ipywidgets; conda activate voila32
  2. Run voila --enable_nbextensions=True empty_notebook.ipynb
  3. See error in the console

Context

  • voila version: 0.3.2
  • Operating System and version: macOS Monterey 12.2.1
  • Browser and version: Brave 1.35.103 (Chromium: 98.0.4758.102)
@mariobuikhuizen mariobuikhuizen added the bug Something isn't working label Mar 8, 2022
@martinRenou
Copy link
Member

What is your nbconvert version?

@martinRenou
Copy link
Member

This error

jinja2.exceptions.UndefinedError: 'include_css' is undefined

is really odd. Are you sure you are running voila===0.3.2? Could you run voila --version?
It sounds like you have a Voila Python package that is outdated, but the template is the one coming from 0.3.2.

@mariobuikhuizen
Copy link
Member Author

nbconvert: 6.4.2
voila --version: 0.3.2

All versions:

conda list                                                                                                              INT х │ voila32 Py │ 15:31:41
# packages in environment at /Users/mariobuikhuizen/miniconda3/envs/voila32:
#
# Name                    Version                   Build  Channel
anyio                     3.5.0           py310h2ec42d9_0    conda-forge
appnope                   0.1.2           py310h2ec42d9_2    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310he24745e_1    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310he24745e_1003    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
certifi                   2021.10.8       py310h2ec42d9_1    conda-forge
cffi                      1.15.0          py310hcc37b68_0    conda-forge
charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
cryptography              36.0.0          py310hf6deb26_0
debugpy                   1.5.1           py310hba3363e_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 0.8.3              pyhd8ed1ab_0    conda-forge
flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.11.2          py310h2ec42d9_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.9.1           py310ha188af9_0    conda-forge
ipython                   8.1.1           py310h2ec42d9_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.5              pyhd8ed1ab_0    conda-forge
jedi                      0.18.1          py310h2ec42d9_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2           py310h2ec42d9_0    conda-forge
jupyter_server            1.13.5             pyhd8ed1ab_1    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.2              pyhd8ed1ab_0    conda-forge
libcxx                    12.0.1               habf9029_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
markupsafe                2.1.0           py310h1961e1f_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py310he24745e_1005    conda-forge
nbclient                  0.5.12             pyhd8ed1ab_0    conda-forge
nbconvert                 6.4.2           py310h2ec42d9_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  he49afe7_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.8              pyha770c72_0    conda-forge
openssl                   3.0.0                h0d85af4_2    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.17.1.1             h694c41f_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
prometheus_client         0.13.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.27             pyha770c72_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1          py310he24745e_0    conda-forge
pysocks                   1.7.1           py310h2ec42d9_4    conda-forge
python                    3.10.2          hea1dfa3_3_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pyzmq                     22.3.0          py310hcce64c8_1    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.9.3          py310h2ec42d9_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0           py310h2ec42d9_2    conda-forge
sqlite                    3.37.0               h23a322b_0    conda-forge
stack_data                0.2.0              pyhd8ed1ab_0    conda-forge
terminado                 0.13.3          py310h2ec42d9_0    conda-forge
testpath                  0.6.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
tornado                   6.1             py310he24745e_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
voila                     0.3.2              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.3.1              pyhd8ed1ab_0    conda-forge
websockets                10.2            py310h1961e1f_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.5.2           py310h2ec42d9_1    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge

@martinRenou
Copy link
Member

This environment looks ok... I am not able to reproduce your issue with almost the same environment.

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
anyio                     3.5.0            py39hf3d152e_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py39h3811e60_1    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
binutils                  2.36.1               hdd6e379_2    conda-forge
binutils_impl_linux-64    2.36.1               h193b22a_2    conda-forge
binutils_linux-64         2.36                 hf3e587d_6    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
bqplot                    0.12.33            pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py39h3811e60_1003    conda-forge
build                     0.7.0              pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
c-compiler                1.4.1                h166bdaf_0    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
certifi                   2021.10.8        py39hf3d152e_1    conda-forge
cffi                      1.15.0           py39h4bc2ebd_0    conda-forge
charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
cmake                     3.22.3               h5432695_0    conda-forge
cmarkgfm                  0.8.0            py39hb9d737c_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
compilers                 1.4.1                ha770c72_0    conda-forge
cryptography              36.0.1           py39h95dcef6_0    conda-forge
cxx-compiler              1.4.1                h924138e_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
debugpy                   1.5.1            py39he80948d_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
deprecation               2.1.0              pyh9f0ad1d_0    conda-forge
docutils                  0.18.1           py39hf3d152e_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 0.8.3              pyhd8ed1ab_0    conda-forge
expat                     2.4.6                h27087fc_0    conda-forge
flake8                    4.0.1              pyhd8ed1ab_1    conda-forge
flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
fortran-compiler          1.4.1                h2a4ca65_0    conda-forge
gcc                       10.3.0               he2824d0_6    conda-forge
gcc_impl_linux-64         10.3.0              hf2f2afa_13    conda-forge
gcc_linux-64              10.3.0               hc39de41_6    conda-forge
gettext                   0.19.8.1          h73d1719_1008    conda-forge
gfortran                  10.3.0               h18518b4_6    conda-forge
gfortran_impl_linux-64    10.3.0              h73f4979_13    conda-forge
gfortran_linux-64         10.3.0               hb09a455_6    conda-forge
gxx                       10.3.0               he2824d0_6    conda-forge
gxx_impl_linux-64         10.3.0              hf2f2afa_13    conda-forge
gxx_linux-64              10.3.0               h2593f52_6    conda-forge
icu                       69.1                 h9c3ff4c_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.2.0            py39hf3d152e_0    conda-forge
importlib_metadata        4.2.0                hd8ed1ab_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.9.1            py39hef51801_0    conda-forge
ipython                   8.1.1            py39hf3d152e_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.5              pyhd8ed1ab_0    conda-forge
jedi                      0.18.1           py39hf3d152e_0    conda-forge
jeepney                   0.7.1              pyhd8ed1ab_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter-packaging         0.11.1             pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2            py39hf3d152e_0    conda-forge
jupyter_server            1.13.5             pyhd8ed1ab_1    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.2              pyhd8ed1ab_0    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_15    conda-forge
keyring                   23.4.0           py39hf3d152e_2    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.19.2               h3790be6_4    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
libblas                   3.9.0           13_linux64_openblas    conda-forge
libcblas                  3.9.0           13_linux64_openblas    conda-forge
libcurl                   7.81.0               h2574ce0_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-devel_linux-64     10.3.0              he6cfe16_13    conda-forge
libgcc-ng                 11.2.0              h1d223b6_13    conda-forge
libgfortran-ng            11.2.0              h69a702a_13    conda-forge
libgfortran5              11.2.0              h5c6108e_13    conda-forge
libglib                   2.70.2               h174f98d_4    conda-forge
libgomp                   11.2.0              h1d223b6_13    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0           13_linux64_openblas    conda-forge
libnghttp2                1.47.0               h727a467_0    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libopenblas               0.3.18          pthreads_h8fe5266_0    conda-forge
libsanitizer              10.3.0              h26c7422_13    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libssh2                   1.10.0               ha56f1ee_2    conda-forge
libstdcxx-devel_linux-64  10.3.0              he6cfe16_13    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_13    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libuv                     1.43.0               h7f98852_0    conda-forge
libzlib                   1.2.11            h36c2ea0_1013    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
markupsafe                2.1.0            py39hb9d737c_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py39h3811e60_1005    conda-forge
nbclient                  0.5.12             pyhd8ed1ab_0    conda-forge
nbconvert                 6.4.2            py39hf3d152e_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h9c3ff4c_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
nodejs                    17.4.0               h8ca31f7_0    conda-forge
notebook                  6.4.8              pyha770c72_0    conda-forge
numpy                     1.22.3           py39h18676bf_0    conda-forge
openssl                   1.1.1l               h7f98852_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.1            py39hde0f152_0    conda-forge
pandoc                    2.17.1.1             ha770c72_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pep517                    0.12.0           py39hf3d152e_1    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
pkginfo                   1.8.2              pyhd8ed1ab_0    conda-forge
prometheus_client         0.13.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.27             pyha770c72_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycodestyle               2.8.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyflakes                  2.4.0              pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1           py39h3811e60_0    conda-forge
pysocks                   1.7.1            py39hf3d152e_4    conda-forge
python                    3.9.10          h85951f9_2_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pyzmq                     22.3.0           py39h37b5a0c_1    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
readme_renderer           27.0               pyh9f0ad1d_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
requests-toolbelt         0.9.1                      py_0    conda-forge
rfc3986                   2.0.0              pyhd8ed1ab_0    conda-forge
rhash                     1.4.1                h7f98852_0    conda-forge
secretstorage             3.3.1            py39hf3d152e_1    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.9.3           py39hf3d152e_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0            py39hf3d152e_2    conda-forge
sqlite                    3.37.0               h9cd32fc_0    conda-forge
stack_data                0.2.0              pyhd8ed1ab_0    conda-forge
sysroot_linux-64          2.12                he073ed8_15    conda-forge
terminado                 0.13.3           py39hf3d152e_0    conda-forge
testpath                  0.6.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomlkit                   0.10.0             pyha770c72_0    conda-forge
tornado                   6.1              py39h3811e60_2    conda-forge
tqdm                      4.63.0             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
traittypes                0.2.1              pyh9f0ad1d_2    conda-forge
twine                     3.8.0              pyhd8ed1ab_0    conda-forge
typing                    3.10.0.0           pyhd8ed1ab_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
voila                     0.3.2              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.3.1              pyhd8ed1ab_0    conda-forge
websockets                10.2             py39hb9d737c_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.5.2            py39hf3d152e_1    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yarn                      1.22.17              ha770c72_0    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h36c2ea0_1013    conda-forge
zstd                      1.5.2                ha95c52a_0    conda-forge

@martinRenou
Copy link
Member

Would you be able to add prints around here?

return {

To make sure this function is called. This is the one that adds the include_css Jinja function.

@mariobuikhuizen
Copy link
Member Author

voila --enable_nbextensions=True Test.ipynb                                                                           ✔ │ 19s │ voila32 Py │ 16:10:50
[Voila] Using /var/folders/nc/trk5zhds5bb4w0hcjp_9lfcw0000gn/T to store connection files
[Voila] Storing connection files in /var/folders/nc/trk5zhds5bb4w0hcjp_9lfcw0000gn/T/voila_i6q0sfo7.
[Voila] Serving static files from /Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/voila/static.
[Voila] Voilà is running at:
http://localhost:8866/
*** create_include_assets_functions lab http://localhost:8866/
[Voila] WARNING | Notebook Test.ipynb is not trusted
[Voila] Kernel started: 00f567c6-15e4-488a-afd4-c51bdcde6660
create_include_assets_functions lab /
ERROR:tornado.application:Uncaught exception in write_error
Traceback (most recent call last):
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 2576, in get
    self.absolute_path = self.validate_absolute_path(self.root, absolute_path)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 860, in validate_absolute_path
    raise web.HTTPError(404)
tornado.web.HTTPError: HTTP 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 1217, in send_error
    self.write_error(status_code, **kwargs)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 590, in write_error
    html = self.render_template("%s.html" % status_code, **ns)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 521, in render_template
    return template.render(**ns)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/404.html", line 1, in top-level template code
    {% extends "error.html" %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/error.html", line 1, in top-level template code
    {% extends "page.html" %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/lab/page.html", line 1, in top-level template code
    {%- extends 'voila/templates/base/page.html' -%}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/page.html", line 13, in top-level template code
    {% block stylesheets %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/lab/page.html", line 11, in block 'stylesheets'
    {{ include_css("static/index.css") }}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/utils.py", line 84, in from_obj
    if hasattr(obj, "jinja_pass_arg"):
jinja2.exceptions.UndefinedError: 'include_css' is undefined
WARNING:tornado.access:404 GET /voila/nbextensions/execute_time/ExecuteTime.js (::1) 13.39ms
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
[IPKernelApp] WARNING | No such comm: 9ac1d87e-4d2d-4b45-b8e9-36cc968d5212

@martinRenou
Copy link
Member

I don't get what the issue is.

So you're saying it is not happening if you're not passing --enable_nbextensions=True?

@mariobuikhuizen
Copy link
Member Author

| So you're saying it is not happening if you're not passing --enable_nbextensions=True?

Indeed.

@mariobuikhuizen
Copy link
Member Author

But you can't re produce it, so it could be something with my environment?

@martinRenou
Copy link
Member

Yes, I am not able to reproduce, on my side it works with and without --enable_nbextensions=True.


Maybe we should focus more on the origin of

Traceback (most recent call last):
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 2576, in get
    self.absolute_path = self.validate_absolute_path(self.root, absolute_path)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 860, in validate_absolute_path
    raise web.HTTPError(404)
tornado.web.HTTPError: HTTP 404: Not Found

Would you be able to add a print statement line 860 of /Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py, to see what validate_absolute_path is being called with when it fails?


Also, I see something interesting in your logs. It looks like it is failing to render the error page:

File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 590, in write_error
    html = self.render_template("%s.html" % status_code, **ns)

which I believe is a bug in Voila that we should fix. We probably don't call create_include_assets_functions for rendering the error template.

@mariobuikhuizen
Copy link
Member Author

mariobuikhuizen commented Mar 8, 2022

Confirmed with printing that absolute_path is empty and this function is only called when using --enable_nbextensions=True

857     def validate_absolute_path(self, root, absolute_path):
858         """check if the file should be served (raises 404, 403, etc.)"""
859         if absolute_path == "":
860             raise web.HTTPError(404)
861

@mariobuikhuizen
Copy link
Member Author

I tried it on linux and can't reproduce it there.

Also, the validate_absolute_path function is not called there when using --enable_nbextensions=True

So it seems the combination of macOS + --enable_nbextensions=True + version 0.3.2 produces the error (or it is something else on my specific machine)

@martinRenou
Copy link
Member

martinRenou commented Mar 8, 2022

Thank you for specifying this. I'll try on MacOS.

EDIT: It looks like I am not able to reproduce on MacOS. It seems to work as intended.
Using the following env:

anyio                     3.5.0           py310h2ec42d9_0    conda-forge
appnope                   0.1.2           py310h2ec42d9_2    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310he24745e_1    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
bqplot                    0.12.33            pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310he24745e_1003    conda-forge
build                     0.7.0              pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.18.1               h0d85af4_0    conda-forge
c-compiler                1.4.1                h774085c_0    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
cctools                   973.0.1              ha54d4a6_9    conda-forge
cctools_osx-64            973.0.1              h609b070_9    conda-forge
certifi                   2021.10.8       py310h2ec42d9_1    conda-forge
cffi                      1.15.0          py310hcc37b68_0    conda-forge
charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
clang                     12.0.1               h694c41f_4    conda-forge
clang-12                  12.0.1          default_he082bbe_4    conda-forge
clang_osx-64              12.0.1               h633439f_7    conda-forge
clangxx                   12.0.1          default_he082bbe_4    conda-forge
clangxx_osx-64            12.0.1               hdb584c0_7    conda-forge
cmake                     3.22.3               h35a7dd9_0    conda-forge
cmarkgfm                  0.8.0           py310h1961e1f_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
compiler-rt               12.0.1               he01351e_0    conda-forge
compiler-rt_osx-64        12.0.1               hd3f61c9_0    conda-forge
compilers                 1.4.1                h694c41f_0    conda-forge
cryptography              36.0.0          py310hf6deb26_0  
cxx-compiler              1.4.1                hbb4e6a2_0    conda-forge
debugpy                   1.5.1           py310hba3363e_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
deprecation               2.1.0              pyh9f0ad1d_0    conda-forge
docutils                  0.18.1          py310h2ec42d9_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 0.8.3              pyhd8ed1ab_0    conda-forge
expat                     2.4.6                h96cf925_0    conda-forge
flake8                    3.9.2              pyhd8ed1ab_0    conda-forge
flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
fortran-compiler          1.4.1                h46a1860_0    conda-forge
gfortran                  9.3.0               h768ea0c_15    conda-forge
gfortran_impl_osx-64      9.3.0               h9cc0e5e_23    conda-forge
gfortran_osx-64           9.3.0               h18f7dce_15    conda-forge
gmp                       6.2.1                h2e338ed_0    conda-forge
icu                       69.1                 he49afe7_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.11.2          py310h2ec42d9_0    conda-forge
importlib_metadata        4.11.2               hd8ed1ab_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.9.1           py310ha188af9_0    conda-forge
ipython                   8.1.1           py310h2ec42d9_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.5              pyhd8ed1ab_0    conda-forge
isl                       0.22.1               hb1e8313_2    conda-forge
jedi                      0.18.1          py310h2ec42d9_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter-packaging         0.11.1             pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2           py310h2ec42d9_0    conda-forge
jupyter_server            1.13.5             pyhd8ed1ab_1    conda-forge
jupyterlab                3.3.0              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.2              pyhd8ed1ab_0    conda-forge
keyring                   23.4.0          py310h2ec42d9_2    conda-forge
krb5                      1.19.2               hb98e516_4    conda-forge
ld64                      609                  h4dfd969_9    conda-forge
ld64_osx-64               609                  hc6b1d1e_9    conda-forge
libblas                   3.9.0           13_osx64_openblas    conda-forge
libcblas                  3.9.0           13_osx64_openblas    conda-forge
libclang-cpp12            12.0.1          default_he082bbe_4    conda-forge
libcurl                   7.81.0               h97da3c1_0    conda-forge
libcxx                    12.0.1               habf9029_1    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_23    conda-forge
libgfortran-devel_osx-64  9.3.0               h6c81a4c_23    conda-forge
libgfortran5              9.3.0               h6c81a4c_23    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.9.0           13_osx64_openblas    conda-forge
libllvm12                 12.0.1               hd011deb_2    conda-forge
libnghttp2                1.47.0               hca56917_0    conda-forge
libopenblas               0.3.18          openmp_h3351f45_0    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libssh2                   1.10.0               hd3787cc_2    conda-forge
libuv                     1.43.0               h0d85af4_0    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
llvm-openmp               13.0.1               hcb1a161_1    conda-forge
llvm-tools                12.0.1               hd011deb_2    conda-forge
lz4-c                     1.9.3                he49afe7_1    conda-forge
markupsafe                2.1.0           py310h1961e1f_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py310he24745e_1005    conda-forge
mpc                       1.2.1                hbb51d92_0    conda-forge
mpfr                      4.1.0                h0f52abe_1    conda-forge
nbclassic                 0.3.6              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.12             pyhd8ed1ab_0    conda-forge
nbconvert                 6.4.2           py310h2ec42d9_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  he49afe7_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
nodejs                    17.4.0               h1fee019_0    conda-forge
notebook                  6.4.8              pyha770c72_0    conda-forge
notebook-shim             0.1.0              pyhd8ed1ab_0    conda-forge
numpy                     1.22.3          py310hb608527_0    conda-forge
openssl                   3.0.0                h0d85af4_2    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.1           py310hdd25497_0    conda-forge
pandoc                    2.17.1.1             h694c41f_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pep517                    0.12.0          py310h2ec42d9_1    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
pkginfo                   1.8.2              pyhd8ed1ab_0    conda-forge
prometheus_client         0.13.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.27             pyha770c72_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycodestyle               2.7.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyflakes                  2.3.1              pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1          py310he24745e_0    conda-forge
pysocks                   1.7.1           py310h2ec42d9_4    conda-forge
python                    3.10.2          hea1dfa3_3_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pyzmq                     22.3.0          py310hcce64c8_1    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
readme_renderer           27.0               pyh9f0ad1d_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
requests-toolbelt         0.9.1                      py_0    conda-forge
rfc3986                   2.0.0              pyhd8ed1ab_0    conda-forge
rhash                     1.4.1                h35c211d_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.9.3          py310h2ec42d9_0    conda-forge
sigtool                   0.1.3                h88f4db0_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0           py310h2ec42d9_2    conda-forge
sqlite                    3.37.0               h23a322b_0    conda-forge
stack_data                0.2.0              pyhd8ed1ab_0    conda-forge
tapi                      1100.0.11            h9ce4665_0    conda-forge
terminado                 0.13.3          py310h2ec42d9_0    conda-forge
testpath                  0.6.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomlkit                   0.10.0             pyha770c72_0    conda-forge
tornado                   6.1             py310he24745e_2    conda-forge
tqdm                      4.63.0             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
traittypes                0.2.1              pyh9f0ad1d_2    conda-forge
twine                     3.8.0              pyhd8ed1ab_0    conda-forge
typing                    3.10.0.0           pyhd8ed1ab_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
voila                     0.3.2                     dev_0    <develop>
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.3.1              pyhd8ed1ab_0    conda-forge
websockets                10.2                     pypi_0    pypi
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.5.2           py310h2ec42d9_1    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
yarn                      1.22.17              h694c41f_0    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge
zstd                      1.5.2                h582d3a0_0    conda-forge

@martinRenou
Copy link
Member

martinRenou commented Mar 9, 2022

@mariobuikhuizen would you be able to try this PR? #1108

Hopefully you should see a more meaningful error with this PR that could help us. You will probably just see a 404 error page, but then I would be interested to know what URL you are looking at.

@mariobuikhuizen
Copy link
Member Author

Thanks! I tried your PR, but still have the same error and also no 404 on the page.

I did now notice that I had an error about an extension I had used a while ago but is not in this environment. Turns out that was the culprit: it had made a file: /Users/mariobuikhuizen/.jupyter/nbconfig/notebook.json with the content:

{
  "load_extensions": {
    "execute_time/ExecuteTime": true,
    "jupyter-js-widgets/extension": true
  },
  "ExecuteTime": {
    "clear_timings_on_clear_output": true
  }
}

Removing this file fixes the error.

@martinRenou
Copy link
Member

martinRenou commented Mar 9, 2022

/Users/mariobuikhuizen/.jupyter/nbconfig/notebook.json

Oh yeah those global paths can be annoying sometimes...

Happy that you could find your issue!

@mariobuikhuizen
Copy link
Member Author

Thanks for the help!

@maartenbreddels
Copy link
Member

These shouldn't cause voila not to work btw. Yes you get error messages in the JS console, because these are nbextensions loaded outside of a notebook context, but that shouldn't matter, so I think there is still a bug.

@martinRenou
Copy link
Member

@mariobuikhuizen was it causing Voila to not work or were you just getting a 404?

@mariobuikhuizen
Copy link
Member Author

It did work, only an error in the console.

@mariobuikhuizen
Copy link
Member Author

I also see these errors when using voila-embed. That somehow tries to load index.js.map, which some extensions don't have.

@martinRenou
Copy link
Member

Ok. I tried locally and can reproduce your issue now.

I believe it should only show a 404 error and not that part though:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/tornado/web.py", line 1217, in send_error
    self.write_error(status_code, **kwargs)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 590, in write_error
    html = self.render_template("%s.html" % status_code, **ns)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 521, in render_template
    return template.render(**ns)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/404.html", line 1, in top-level template code
    {% extends "error.html" %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/error.html", line 1, in top-level template code
    {% extends "page.html" %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/lab/page.html", line 1, in top-level template code
    {%- extends 'voila/templates/base/page.html' -%}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/base/page.html", line 13, in top-level template code
    {% block stylesheets %}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/share/jupyter/voila/templates/lab/page.html", line 11, in block 'stylesheets'
    {{ include_css("static/index.css") }}
  File "/Users/mariobuikhuizen/miniconda3/envs/voila32/lib/python3.10/site-packages/jinja2/utils.py", line 84, in from_obj
    if hasattr(obj, "jinja_pass_arg"):
jinja2.exceptions.UndefinedError: 'include_css' is undefined

@martinRenou martinRenou reopened this Mar 9, 2022
@martinRenou
Copy link
Member

1ba7791 should prevent this error. Testing locally, I only see the 404 error now:

WARNING:tornado.access:404 GET /voila/nbextensions/execute_time/ExecuteTime.js (::1) 1.88ms

@maartenbreddels
Copy link
Member

Any idea why this is related to the extensions? Or is it not?
Many people think that the js errors in the console cause failure to render, but they almost never do, so I'm surprised to see that here it does seem to matter.

@martinRenou
Copy link
Member

It's just a 404 error because the nbextension is not found, it does not prevent the Notebook to render.

@mariobuikhuizen
Copy link
Member Author

mariobuikhuizen commented Mar 9, 2022

1ba7791 should prevent this error. Testing locally, I only see the 404 error now:

It works, thanks!

A problem with the 404 errors in the log is that sometimes the missing file can be expected. E.g. in https://github.com/mariobuikhuizen/voila-embed a .map file is trying to load, but isn't available for all extensions.

WARNING:tornado.access:404 GET /voila/nbextensions/bqplot-image-gl/index.js.map (::1) 55.38ms
WARNING:tornado.access:404 GET /voila/nbextensions/bqplot/index.js.map (::1) 2.75ms

(but this is probably never a problem in the "normal" use of Voila)

@maartenbreddels
Copy link
Member

They shouldn't cause any issues, it's just that the browser will try to fetch the source maps, I think you don't see those in the dev console network tab even.

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

3 participants