Ipywidgets with Voila not showing: ERROR tornado Uncaught exception GET
Asked Answered
K

1

6

I am trying to use voila by running the examples they provide, but the widgets don't show (outputs from jupyter and voila) and I get these errors:

(voila_env) Z:\Programming\voila\notebooks>voila basics.ipynb
[Voila] Using C:\Users\MARCEL~1\AppData\Local\Temp to store connection files
[Voila] Storing connection files in C:\Users\MARCEL~1\AppData\Local\Temp\voila_hgasx21q.
[Voila] Serving static files from Z:\anaconda3\envs\voila_env\lib\site-packages\voila\static.
[Voila] Voilà is running at:
http://localhost:8866/
[Voila] WARNING | Notebook basics.ipynb is not trusted
[Voila] Kernel started: 30ffdbc7-a285-496e-965b-73d1f051c382
ERROR:tornado.application:Uncaught exception GET /voila/templates/lab/static/index.css?v=157743fa4e0f4c8216448c596a8d3586 (::1)
HTTPServerRequest(protocol='http', host='localhost:8866', method='GET', uri='/voila/templates/lab/static/index.css?v=157743fa4e0f4c8216448c596a8d3586', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\tornado\web.py", line 1703, in _execute
    result = await result
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\tornado\web.py", line 2580, in get
    absolute_path = self.get_absolute_path(self.root, self.path)
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\voila\static_file_handler.py", line 56, in get_absolute_path
    template, static, relpath = path.split('/', 2)
ValueError: not enough values to unpack (expected 3, got 1)
ERROR:tornado.access:500 GET /voila/templates/lab/static/index.css?v=157743fa4e0f4c8216448c596a8d3586 (::1) 2.99ms
ERROR:tornado.application:Uncaught exception GET /voila/templates/lab/static/theme-light.css?v=25cb4a7071f905b9bdcf234d7215aa07 (::1)
HTTPServerRequest(protocol='http', host='localhost:8866', method='GET', uri='/voila/templates/lab/static/theme-light.css?v=25cb4a7071f905b9bdcf234d7215aa07', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\tornado\web.py", line 1703, in _execute
    result = await result
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\tornado\web.py", line 2580, in get
    absolute_path = self.get_absolute_path(self.root, self.path)
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\voila\static_file_handler.py", line 56, in get_absolute_path
    template, static, relpath = path.split('/', 2)
ValueError: not enough values to unpack (expected 3, got 1)
ERROR:tornado.access:500 GET /voila/templates/lab/static/theme-light.css?v=25cb4a7071f905b9bdcf234d7215aa07 (::1) 5.98ms
ERROR:tornado.application:Uncaught exception GET /voila/templates/lab/static/main.js?v=9de22d21d90835225053df83a51fd350 (::1)
HTTPServerRequest(protocol='http', host='localhost:8866', method='GET', uri='/voila/templates/lab/static/main.js?v=9de22d21d90835225053df83a51fd350', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\tornado\web.py", line 1703, in _execute
    result = await result
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\tornado\web.py", line 2580, in get
    absolute_path = self.get_absolute_path(self.root, self.path)
  File "Z:\anaconda3\envs\voila_env\lib\site-packages\voila\static_file_handler.py", line 56, in get_absolute_path
    template, static, relpath = path.split('/', 2)
ValueError: not enough values to unpack (expected 3, got 1)
ERROR:tornado.access:500 GET /voila/templates/lab/static/main.js?v=9de22d21d90835225053df83a51fd350 (::1) 1.99ms
WARNING:tornado.general:403 GET /voila/files/favicon.ico (::1): File not whitelisted
WARNING:tornado.access:403 GET /voila/files/favicon.ico (::1) 0.99ms

It seems a problem with path. I have my OS installed in drive C: while Anaconda and the codes are placed in another drive (Z:). I have installed voila with conda in a fresh environment.

History of my attempts to solve this:

  • This fix solved a previous NotImplemented error;
  • Updating pygments as suggested here did not solve it;
  • I have tried using the flag --enable_nbextensions=True, it didn't change anything;

Below are the packages versions installed in the environment:

# packages in environment at Z:\anaconda3\envs\voila_env:
#
# Name                    Version                   Build  Channel
argon2-cffi               20.1.0           py38he774522_1
async_generator           1.10                       py_0    conda-forge
attrs                     20.2.0             pyh9f0ad1d_0    conda-forge
backcall                  0.2.0                      py_0
blas                      1.0                         mkl
bleach                    3.2.1              pyh9f0ad1d_0    conda-forge
blosc                     1.20.1               ha925a31_0    conda-forge
bqplot                    0.12.17            pyh9f0ad1d_0    conda-forge
brotli                    1.0.9                ha925a31_0    conda-forge
brotlipy                  0.7.0           py38h1e8a9f7_1000    conda-forge
bzip2                     1.0.8                he774522_3    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
certifi                   2020.6.20        py38h32f6830_0    conda-forge
cffi                      1.14.3           py38h7a1dbc1_0
chardet                   3.0.4           py38h32f6830_1007    conda-forge
charls                    2.1.0                h33f27b4_2    conda-forge
cloudpickle               1.6.0                      py_0    conda-forge
colorama                  0.4.3                      py_0
cryptography              3.1.1            py38hba49e27_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
cytoolz                   0.11.0           py38h1e8a9f7_0    conda-forge
dask-core                 2.28.0                     py_0    conda-forge
decorator                 4.4.2                      py_0
defusedxml                0.6.0                      py_0    conda-forge
entrypoints               0.3             py38h32f6830_1001    conda-forge
freetype                  2.10.2               hd328e21_0    conda-forge
giflib                    5.2.1                h2fa13f4_2    conda-forge
git                       2.23.0               h6bb4b03_0
icc_rt                    2019.0.0             h0cc432a_1
idna                      2.10               pyh9f0ad1d_0    conda-forge
imagecodecs               2020.5.30        py38h2dff1b1_2    conda-forge
imageio                   2.9.0                      py_0    conda-forge
importlib-metadata        1.7.0            py38h32f6830_0    conda-forge
importlib_metadata        1.7.0                         0    conda-forge
intel-openmp              2020.1                      216
ipydatawidgets            4.1.0              pyh9f0ad1d_0    conda-forge
ipykernel                 5.3.4            py38h5ca1d4c_0
ipython                   7.18.1           py38h5ca1d4c_0
ipython_genutils          0.2.0                      py_1    conda-forge
ipyvolume                 0.6.0a6            pyh9f0ad1d_0    conda-forge
ipywebrtc                 0.5.0                    py38_0    conda-forge
ipywidgets                7.5.1              pyh9f0ad1d_1    conda-forge
jedi                      0.17.2                   py38_0
jinja2                    2.11.2             pyh9f0ad1d_0    conda-forge
jpeg                      9d                   he774522_0    conda-forge
jsonschema                3.2.0            py38h32f6830_1    conda-forge
jupyter_client            6.1.7                      py_0    conda-forge
jupyter_core              4.6.3            py38h32f6830_1    conda-forge
jupyter_server            0.3.0            py38h32f6830_0    conda-forge
jupyterlab_pygments       0.1.1              pyh9f0ad1d_0    conda-forge
jxrlib                    1.1                  hfa6e2cd_2    conda-forge
kiwisolver                1.2.0            py38heaebd3c_0    conda-forge
lcms2                     2.11                 he1115b7_0    conda-forge
lerc                      2.2                  ha925a31_0    conda-forge
libaec                    1.0.4                he025d50_1    conda-forge
libblas                   3.8.0                    16_mkl    conda-forge
libcblas                  3.8.0                    16_mkl    conda-forge
liblapack                 3.8.0                    16_mkl    conda-forge
libpng                    1.6.37               ha81a0f5_2    conda-forge
libsodium                 1.0.17               h2fa13f4_0    conda-forge
libtiff                   4.1.0                h885aae3_6    conda-forge
libwebp-base              1.1.0                hfa6e2cd_3    conda-forge
libzopfli                 1.0.3                ha925a31_0    conda-forge
lz4-c                     1.9.2                h62dcd97_2    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6
m2w64-gcc-libs            5.3.0                         7
m2w64-gcc-libs-core       5.3.0                         7
m2w64-gmp                 6.1.0                         2
m2w64-libwinpthread-git   5.0.0.4634.697f757               2
markupsafe                1.1.1            py38h1e8a9f7_1    conda-forge
matplotlib-base           3.3.2            py38hfb9ee82_0    conda-forge
mistune                   0.8.4           py38h9de7a3e_1001    conda-forge
mkl                       2020.1                      216
mkl-service               2.3.0            py38hb782905_0
msys2-conda-epoch         20160418                      1
nbclient                  0.5.0                      py_0    conda-forge
nbconvert                 6.0.6            py38h32f6830_0    conda-forge
nbformat                  5.0.7                      py_0    conda-forge
nest-asyncio              1.4.0                      py_1    conda-forge
networkx                  2.5                        py_0    conda-forge
notebook                  6.1.1                    py38_0
numpy                     1.19.1           py38h72c728b_0    conda-forge
olefile                   0.46                       py_0    conda-forge
openjpeg                  2.3.1                h57dd2e7_3    conda-forge
openssl                   1.1.1h               he774522_0    conda-forge
packaging                 20.4               pyh9f0ad1d_0    conda-forge
pandas                    1.1.2            py38h7ae7562_0    conda-forge
pandoc                    2.10.1               he774522_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.7.0                      py_0
pickleshare               0.7.5                 py38_1000
pillow                    7.2.0            py38h7011068_1    conda-forge
pip                       20.2.3                     py_0    conda-forge
prometheus_client         0.8.0              pyh9f0ad1d_0    conda-forge
prompt-toolkit            3.0.7                      py_0
pycparser                 2.20                       py_2
pygments                  2.7.1                      py_0    conda-forge
pyopenssl                 19.1.0                     py_1    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyrsistent                0.17.3           py38h1e8a9f7_0    conda-forge
pysocks                   1.7.1            py38h32f6830_1    conda-forge
python                    3.8.5           h60c2a47_8_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pythreejs                 2.2.0              pyh8c360ce_0    conda-forge
pytz                      2020.1             pyh9f0ad1d_0    conda-forge
pywavelets                1.1.1            py38h1e00858_2    conda-forge
pywin32                   227              py38hfa6e2cd_0    conda-forge
pywinpty                  0.5.7                    py38_0    conda-forge
pyyaml                    5.3.1            py38h1e8a9f7_0    conda-forge
pyzmq                     19.0.2           py38h77b9d75_0    conda-forge
requests                  2.24.0             pyh9f0ad1d_0    conda-forge
scikit-image              0.17.2           py38h251f6bf_2    conda-forge
scipy                     1.5.0            py38h9439919_0
send2trash                1.5.0                      py_0    conda-forge
setuptools                49.6.0           py38h32f6830_1    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
sqlite                    3.33.0               he774522_0    conda-forge
terminado                 0.9.1            py38h32f6830_0    conda-forge
testpath                  0.4.4                      py_0    conda-forge
tifffile                  2020.9.22                  py_0    conda-forge
tk                        8.6.10               he774522_0    conda-forge
toolz                     0.11.1                     py_0    conda-forge
tornado                   6.0.4            py38hfa6e2cd_0    conda-forge
traitlets                 4.3.3            py38h32f6830_1    conda-forge
traittypes                0.2.1              pyh9f0ad1d_2    conda-forge
urllib3                   1.25.10                    py_0    conda-forge
vc                        14.1                 h869be7e_1    conda-forge
voila                     0.2.2                      py_0    conda-forge
vs2015_runtime            14.16.27012          h30e32a0_2    conda-forge
wcwidth                   0.2.5                      py_0
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.35.1             pyh9f0ad1d_0    conda-forge
widgetsnbextension        3.5.1            py38h32f6830_1    conda-forge
win_inet_pton             1.1.0                    py38_0    conda-forge
wincertstore              0.2                   py38_1003    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
zeromq                    4.3.2                ha925a31_3    conda-forge
zfp                       0.5.5                ha925a31_1    conda-forge
zipp                      3.1.0                      py_0    conda-forge
zlib                      1.2.11            h62dcd97_1009    conda-forge
zstd                      1.4.5                h1f3a1b7_2    conda-forge

Am I missing something?

Kensell answered 5/10, 2020 at 12:50 Comment(1)
same question here? any final fix?Appalachia
K
1

Well, I solved my own problem recently by unisntalling Anaconda and reinstalling it in drive C:. I could not make voila work if Anaconda was in another drive.

Kensell answered 13/12, 2020 at 23:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.