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

Cannot load image: TypeError: 'coroutine' object is not subscriptable #1473

Open
EnzoPB opened this issue May 27, 2024 · 0 comments
Open

Cannot load image: TypeError: 'coroutine' object is not subscriptable #1473

EnzoPB opened this issue May 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@EnzoPB
Copy link

EnzoPB commented May 27, 2024

Description

When trying to load an image with markdown, the notebook stops loading.
It only happens with markdown image syntax (HTML or Image IPython widget are fine), and only when using voila in Jupyter Lab/Server, not when using voila standalone (python -m voila).
It raise the exception TypeError: 'coroutine' object is not subscriptable (see Command line output)

Reproduce

  1. Start Jupyter (python -m jupyter notebook)
  2. Open a notebook containing an image
  3. Click the "Render with Voila" button

I managed to replicate this behavior in Binder, in a normal Python installation, and in a conda environment, with Voila installed from source (i followed the contributing guide)

Expected behavior

The image & the rest of the notebook should render, like when using an HTML image.

Context

  • voila version: 0.5.7
  • Operating System and version: Ubuntu 22.04.4 LTS, Debian 12, Binder
Troubleshoot Output
[Voila] Kernel started: a7ac5aaf-f478-4007-8f4b-3615ca61cd18
[Voila] Connecting to kernel a7ac5aaf-f478-4007-8f4b-3615ca61cd18.
[Voila] Starting buffering for a7ac5aaf-f478-4007-8f4b-3615ca61cd18:0d967988-50b4-43ba-ab94-4d59cb5d6254
[Voila] Kernel shutdown: a7ac5aaf-f478-4007-8f4b-3615ca61cd18
^C[Voila] Stopping...
[Voila] Kernel shutdown: 509749a0-4319-43e0-8cd0-f461c00e0744
(voila) enzo@enzopc:~/dev/voila/voila$ jupyter troubleshoot
$PATH:
        /opt/miniconda/envs/voila/bin
        /opt/miniconda/condabin
        /home/enzo/.nvm/versions/node/v21.7.2/bin
        /home/enzo/.local/bin
        /usr/local/sbin
        /usr/local/bin
        /usr/sbin
        /usr/bin
        /sbin
        /bin
        /usr/games
        /usr/local/games
        /snap/bin
        /snap/bin
        /home/enzo/.local/share/JetBrains/Toolbox/scripts
        /var/lib/flatpak/exports/bin
        /opt/dart-sass
        /usr/local/go/bin
        /home/enzo/dev/voila/voila/node_modules/.bin

sys.path:
/opt/miniconda/envs/voila/bin
/opt/miniconda/envs/voila/lib/python312.zip
/opt/miniconda/envs/voila/lib/python3.12
/opt/miniconda/envs/voila/lib/python3.12/lib-dynload
/home/enzo/.local/lib/python3.12/site-packages
/opt/miniconda/envs/voila/lib/python3.12/site-packages
/home/enzo/dev/voila/voila

sys.executable:
/opt/miniconda/envs/voila/bin/python

sys.version:
3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:38:13) [GCC 12.3.0]

platform.platform():
Linux-6.5.0-35-generic-x86_64-with-glibc2.35

which -a jupyter:
/opt/miniconda/envs/voila/bin/jupyter
/home/enzo/.local/bin/jupyter
/usr/local/bin/jupyter

pip list:
Package Version Editable project location
------------------------- -------------- --------------------------
annotated-types 0.7.0
anyio 4.3.0
argcomplete 3.3.0
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
astroid 3.1.0
asttokens 2.4.1
async-lru 2.0.4
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
bleach 6.1.0
Brotli 1.1.0
build 1.2.1
cached-property 1.5.2
cattrs 23.2.3
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
click-option-group 0.5.6
comm 0.2.2
debugpy 1.8.1
decorator 5.1.1
defusedxml 0.7.1
dill 0.3.8
distlib 0.3.8
docutils 0.21.2
dotty-dict 1.3.1
entrypoints 0.4
exceptiongroup 1.2.0
executing 2.0.1
fastcore 1.5.38
fastjsonschema 2.19.1
filelock 3.14.0
fqdn 1.5.1
ghapi 1.0.4
gitdb 4.0.11
github-activity 0.3.0
GitPython 3.1.43
h11 0.14.0
h2 4.1.0
hatch 1.11.1
hatchling 1.24.2
hpack 4.0.0
httpcore 1.0.5
httpx 0.27.0
hyperframe 6.0.1
hyperlink 21.0.0
idna 3.7
importlib_metadata 7.1.0
importlib_resources 6.4.0
ipykernel 6.29.4
ipython 8.24.0
isoduration 20.11.0
isort 5.13.2
jedi 0.19.1
Jinja2 3.1.4
json5 0.9.25
jsonpointer 2.4
jsonschema 4.22.0
jsonschema-specifications 2023.12.1
jupyter_client 8.6.2
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_releaser 1.9.0.dev0
jupyter_server 2.14.0
jupyter_server_terminals 0.5.3
jupyterlab 4.2.1
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.2
Markdown 3.6
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib-inline 0.1.7
mccabe 0.7.0
mdformat 0.7.17
mdurl 0.1.2
minecraft_data_standalone 3.21.0
minipip 0.1b5
mistune 3.0.2
mutagen 1.47.0
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
nest-asyncio 1.6.0
nh3 0.2.17
notebook 7.2.0
notebook_shim 0.2.4
numpy 1.26.4
overrides 7.7.0
packaging 24.0
pandas 2.2.2
pandocfilters 1.5.0
parso 0.8.4
pathspec 0.12.1
pexpect 4.9.0
pickleshare 0.7.5
pip 24.0
pipx 1.5.0
pkginfo 1.10.0
pkgutil_resolve_name 1.3.10
platformdirs 4.2.1
pluggy 1.5.0
prometheus_client 0.20.0
prompt-toolkit 3.0.43
psutil 5.9.8
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.22
pycryptodomex 3.20.0
pydantic 2.7.1
pydantic_core 2.18.2
Pygments 2.18.0
pylint 3.1.0
pypiserver 2.1.1
pyproject_hooks 1.1.0
PySocks 1.7.1
python-dateutil 2.9.0.post0
python-gitlab 4.5.0
python-json-logger 2.0.7
python-semantic-release 9.7.3
pytz 2024.1
PyYAML 6.0.1
pyzmq 26.0.3
readme_renderer 43.0
referencing 0.35.1
requests 2.32.2
requests-cache 1.2.0
requests-toolbelt 1.0.0
rfc3339-validator 0.1.4
rfc3986 2.0.0
rfc3986-validator 0.1.1
rich 13.7.1
rpds-py 0.18.1
Send2Trash 1.8.3
setuptools 69.5.1
shellingham 1.5.4
six 1.16.0
smmap 5.0.1
sniffio 1.3.1
soupsieve 2.5
stack-data 0.6.3
terminado 0.18.1
tinycss2 1.3.0
toml 0.10.2
tomli 2.0.1
tomli_w 1.0.0
tomlkit 0.12.4
tornado 6.4
tqdm 4.66.4
traitlets 5.14.3
trove-classifiers 2024.5.22
twine 5.1.0
types-python-dateutil 2.9.0.20240316
typing_extensions 4.12.0
typing-utils 0.1.0
tzdata 2024.1
uri-template 1.3.0
url-normalize 1.4.3
urllib3 2.2.1
userpath 1.9.2
uv 0.2.2
virtualenv 20.26.2
voila 0.5.7 /home/enzo/dev/voila/voila
wcwidth 0.2.13
webcolors 1.13
webencodings 0.5.1
websocket-client 1.8.0
websockets 12.0
wheel 0.43.0
yt-dlp 2024.4.9
zipp 3.17.0
zstandard 0.22.0

conda list:
# packages in environment at /opt/miniconda/envs/voila:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
anyio 4.3.0 pyhd8ed1ab_0 conda-forge
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py312h98912ed_4 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
asttokens 2.4.1 pyhd8ed1ab_0 conda-forge
async-lru 2.0.4 pyhd8ed1ab_0 conda-forge
attrs 23.2.0 pyh71513ae_0 conda-forge
babel 2.14.0 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.12.3 pyha770c72_0 conda-forge
bleach 6.1.0 pyhd8ed1ab_0 conda-forge
brotli-python 1.1.0 py312h30efb56_1 conda-forge
bzip2 1.0.8 hd590300_5 conda-forge
ca-certificates 2024.2.2 hbcca054_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
certifi 2024.2.2 pyhd8ed1ab_0 conda-forge
cffi 1.16.0 py312hf06ca03_0 conda-forge
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge
comm 0.2.2 pyhd8ed1ab_0 conda-forge
debugpy 1.8.1 py312h30efb56_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
exceptiongroup 1.2.0 pyhd8ed1ab_2 conda-forge
executing 2.0.1 pyhd8ed1ab_0 conda-forge
fqdn 1.5.1 pyhd8ed1ab_0 conda-forge
h11 0.14.0 pyhd8ed1ab_0 conda-forge
h2 4.1.0 pyhd8ed1ab_0 conda-forge
hpack 4.0.0 pyh9f0ad1d_0 conda-forge
httpcore 1.0.5 pyhd8ed1ab_0 conda-forge
httpx 0.27.0 pyhd8ed1ab_0 conda-forge
hyperframe 6.0.1 pyhd8ed1ab_0 conda-forge
icu 73.2 h59595ed_0 conda-forge
idna 3.7 pyhd8ed1ab_0 conda-forge
importlib-metadata 7.1.0 pyha770c72_0 conda-forge
importlib_metadata 7.1.0 hd8ed1ab_0 conda-forge
importlib_resources 6.4.0 pyhd8ed1ab_0 conda-forge
ipykernel 6.29.3 pyhd33586a_0 conda-forge
ipython 8.24.0 pyh707e725_0 conda-forge
isoduration 20.11.0 pyhd8ed1ab_0 conda-forge
jedi 0.19.1 pyhd8ed1ab_0 conda-forge
jinja2 3.1.4 pyhd8ed1ab_0 conda-forge
json5 0.9.25 pyhd8ed1ab_0 conda-forge
jsonpointer 2.4 py312h7900ff3_3 conda-forge
jsonschema 4.22.0 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.12.1 pyhd8ed1ab_0 conda-forge
jsonschema-with-format-nongpl 4.22.0 pyhd8ed1ab_0 conda-forge
jupyter-lsp 2.2.5 pyhd8ed1ab_0 conda-forge
jupyter_client 8.6.2 pyhd8ed1ab_0 conda-forge
jupyter_core 5.7.2 py312h7900ff3_0 conda-forge
jupyter_events 0.10.0 pyhd8ed1ab_0 conda-forge
jupyter_server 2.14.0 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.5.3 pyhd8ed1ab_0 conda-forge
jupyterlab 4.2.1 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.3.0 pyhd8ed1ab_1 conda-forge
jupyterlab_server 2.27.2 pyhd8ed1ab_0 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.21.2 h659d440_0 conda-forge
ld_impl_linux-64 2.40 hf3520f5_1 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libexpat 2.6.2 h59595ed_0 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 13.2.0 h77fa898_7 conda-forge
libgomp 13.2.0 h77fa898_7 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libsqlite 3.45.3 h2797004_0 conda-forge
libstdcxx-ng 13.2.0 hc0a3c3a_7 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libuv 1.48.0 hd590300_0 conda-forge
libxcrypt 4.4.36 hd590300_1 conda-forge
libzlib 1.2.13 hd590300_5 conda-forge
markupsafe 2.1.5 py312h98912ed_0 conda-forge
matplotlib-inline 0.1.7 pyhd8ed1ab_0 conda-forge
mistune 3.0.2 pyhd8ed1ab_0 conda-forge
nbclient 0.10.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.16.4 pyhd8ed1ab_0 conda-forge
nbformat 5.10.4 pyhd8ed1ab_0 conda-forge
ncurses 6.5 h59595ed_0 conda-forge
nest-asyncio 1.6.0 pyhd8ed1ab_0 conda-forge
nodejs 20.12.2 hb753e55_0 conda-forge
notebook 7.2.0 pyhd8ed1ab_0 conda-forge
notebook-shim 0.2.4 pyhd8ed1ab_0 conda-forge
openssl 3.3.0 h4ab18f5_3 conda-forge
overrides 7.7.0 pyhd8ed1ab_0 conda-forge
packaging 24.0 pyhd8ed1ab_0 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.4 pyhd8ed1ab_0 conda-forge
pexpect 4.9.0 pyhd8ed1ab_0 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pip 24.0 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 4.2.2 pyhd8ed1ab_0 conda-forge
prometheus_client 0.20.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.42 pyha770c72_0 conda-forge
psutil 5.9.8 py312h98912ed_0 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pycparser 2.22 pyhd8ed1ab_0 conda-forge
pygments 2.18.0 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.12.3 hab00c5b_0_cpython conda-forge
python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.19.1 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python_abi 3.12 4_cp312 conda-forge
pytz 2024.1 pyhd8ed1ab_0 conda-forge
pyyaml 6.0.1 py312h98912ed_1 conda-forge
pyzmq 26.0.3 py312h8fd38d8_0 conda-forge
readline 8.2 h8228510_1 conda-forge
referencing 0.35.1 pyhd8ed1ab_0 conda-forge
requests 2.32.2 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rpds-py 0.18.1 py312h4413252_0 conda-forge
send2trash 1.8.3 pyh0d859eb_0 conda-forge
setuptools 70.0.0 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.1 pyhd8ed1ab_0 conda-forge
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
terminado 0.18.1 pyh0d859eb_0 conda-forge
tinycss2 1.3.0 pyhd8ed1ab_0 conda-forge
tk 8.6.13 noxft_h4845f30_101 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.4 py312h98912ed_0 conda-forge
traitlets 5.14.3 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.9.0.20240316 pyhd8ed1ab_0 conda-forge
typing-extensions 4.11.0 hd8ed1ab_0 conda-forge
typing_extensions 4.11.0 pyha770c72_0 conda-forge
typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge
tzdata 2024a h0c530f3_0 conda-forge
uri-template 1.3.0 pyhd8ed1ab_0 conda-forge
urllib3 2.2.1 pyhd8ed1ab_0 conda-forge
voila 0.5.7 pypi_0 pypi
wcwidth 0.2.13 pyhd8ed1ab_0 conda-forge
webcolors 1.13 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 pyhd8ed1ab_2 conda-forge
websocket-client 1.8.0 pyhd8ed1ab_0 conda-forge
wheel 0.43.0 pyhd8ed1ab_1 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
yarn 3.7.0 h31011fe_0 conda-forge
zeromq 4.3.5 h75354e8_4 conda-forge
zipp 3.17.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 hd590300_5 conda-forge

conda env:
name: voila
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- anyio=4.3.0=pyhd8ed1ab_0
- argon2-cffi=23.1.0=pyhd8ed1ab_0
- argon2-cffi-bindings=21.2.0=py312h98912ed_4
- arrow=1.3.0=pyhd8ed1ab_0
- asttokens=2.4.1=pyhd8ed1ab_0
- async-lru=2.0.4=pyhd8ed1ab_0
- attrs=23.2.0=pyh71513ae_0
- babel=2.14.0=pyhd8ed1ab_0
- beautifulsoup4=4.12.3=pyha770c72_0
- bleach=6.1.0=pyhd8ed1ab_0
- brotli-python=1.1.0=py312h30efb56_1
- bzip2=1.0.8=hd590300_5
- ca-certificates=2024.2.2=hbcca054_0
- cached-property=1.5.2=hd8ed1ab_1
- cached_property=1.5.2=pyha770c72_1
- certifi=2024.2.2=pyhd8ed1ab_0
- cffi=1.16.0=py312hf06ca03_0
- charset-normalizer=3.3.2=pyhd8ed1ab_0
- comm=0.2.2=pyhd8ed1ab_0
- debugpy=1.8.1=py312h30efb56_0
- decorator=5.1.1=pyhd8ed1ab_0
- defusedxml=0.7.1=pyhd8ed1ab_0
- entrypoints=0.4=pyhd8ed1ab_0
- exceptiongroup=1.2.0=pyhd8ed1ab_2
- executing=2.0.1=pyhd8ed1ab_0
- fqdn=1.5.1=pyhd8ed1ab_0
- h11=0.14.0=pyhd8ed1ab_0
- h2=4.1.0=pyhd8ed1ab_0
- hpack=4.0.0=pyh9f0ad1d_0
- httpcore=1.0.5=pyhd8ed1ab_0
- httpx=0.27.0=pyhd8ed1ab_0
- hyperframe=6.0.1=pyhd8ed1ab_0
- icu=73.2=h59595ed_0
- idna=3.7=pyhd8ed1ab_0
- importlib-metadata=7.1.0=pyha770c72_0
- importlib_metadata=7.1.0=hd8ed1ab_0
- importlib_resources=6.4.0=pyhd8ed1ab_0
- ipykernel=6.29.3=pyhd33586a_0
- ipython=8.24.0=pyh707e725_0
- isoduration=20.11.0=pyhd8ed1ab_0
- jedi=0.19.1=pyhd8ed1ab_0
- jinja2=3.1.4=pyhd8ed1ab_0
- json5=0.9.25=pyhd8ed1ab_0
- jsonpointer=2.4=py312h7900ff3_3
- jsonschema=4.22.0=pyhd8ed1ab_0
- jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
- jsonschema-with-format-nongpl=4.22.0=pyhd8ed1ab_0
- jupyter-lsp=2.2.5=pyhd8ed1ab_0
- jupyter_client=8.6.2=pyhd8ed1ab_0
- jupyter_core=5.7.2=py312h7900ff3_0
- jupyter_events=0.10.0=pyhd8ed1ab_0
- jupyter_server=2.14.0=pyhd8ed1ab_0
- jupyter_server_terminals=0.5.3=pyhd8ed1ab_0
- jupyterlab=4.2.1=pyhd8ed1ab_0
- jupyterlab_pygments=0.3.0=pyhd8ed1ab_1
- jupyterlab_server=2.27.2=pyhd8ed1ab_0
- keyutils=1.6.1=h166bdaf_0
- krb5=1.21.2=h659d440_0
- ld_impl_linux-64=2.40=hf3520f5_1
- libedit=3.1.20191231=he28a2e2_2
- libexpat=2.6.2=h59595ed_0
- libffi=3.4.2=h7f98852_5
- libgcc-ng=13.2.0=h77fa898_7
- libgomp=13.2.0=h77fa898_7
- libnsl=2.0.1=hd590300_0
- libsodium=1.0.18=h36c2ea0_1
- libsqlite=3.45.3=h2797004_0
- libstdcxx-ng=13.2.0=hc0a3c3a_7
- libuuid=2.38.1=h0b41bf4_0
- libuv=1.48.0=hd590300_0
- libxcrypt=4.4.36=hd590300_1
- libzlib=1.2.13=hd590300_5
- markupsafe=2.1.5=py312h98912ed_0
- matplotlib-inline=0.1.7=pyhd8ed1ab_0
- mistune=3.0.2=pyhd8ed1ab_0
- nbclient=0.10.0=pyhd8ed1ab_0
- nbconvert-core=7.16.4=pyhd8ed1ab_0
- nbformat=5.10.4=pyhd8ed1ab_0
- ncurses=6.5=h59595ed_0
- nest-asyncio=1.6.0=pyhd8ed1ab_0
- nodejs=20.12.2=hb753e55_0
- notebook=7.2.0=pyhd8ed1ab_0
- notebook-shim=0.2.4=pyhd8ed1ab_0
- openssl=3.3.0=h4ab18f5_3
- overrides=7.7.0=pyhd8ed1ab_0
- packaging=24.0=pyhd8ed1ab_0
- pandocfilters=1.5.0=pyhd8ed1ab_0
- parso=0.8.4=pyhd8ed1ab_0
- pexpect=4.9.0=pyhd8ed1ab_0
- pickleshare=0.7.5=py_1003
- pip=24.0=pyhd8ed1ab_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
- platformdirs=4.2.2=pyhd8ed1ab_0
- prometheus_client=0.20.0=pyhd8ed1ab_0
- prompt-toolkit=3.0.42=pyha770c72_0
- psutil=5.9.8=py312h98912ed_0
- ptyprocess=0.7.0=pyhd3deb0d_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.22=pyhd8ed1ab_0
- pygments=2.18.0=pyhd8ed1ab_0
- pysocks=1.7.1=pyha2e5f31_6
- python=3.12.3=hab00c5b_0_cpython
- python-dateutil=2.9.0=pyhd8ed1ab_0
- python-fastjsonschema=2.19.1=pyhd8ed1ab_0
- python-json-logger=2.0.7=pyhd8ed1ab_0
- python_abi=3.12=4_cp312
- pytz=2024.1=pyhd8ed1ab_0
- pyyaml=6.0.1=py312h98912ed_1
- pyzmq=26.0.3=py312h8fd38d8_0
- readline=8.2=h8228510_1
- referencing=0.35.1=pyhd8ed1ab_0
- requests=2.32.2=pyhd8ed1ab_0
- rfc3339-validator=0.1.4=pyhd8ed1ab_0
- rfc3986-validator=0.1.1=pyh9f0ad1d_0
- rpds-py=0.18.1=py312h4413252_0
- send2trash=1.8.3=pyh0d859eb_0
- setuptools=70.0.0=pyhd8ed1ab_0
- six=1.16.0=pyh6c4a22f_0
- sniffio=1.3.1=pyhd8ed1ab_0
- soupsieve=2.5=pyhd8ed1ab_1
- stack_data=0.6.2=pyhd8ed1ab_0
- terminado=0.18.1=pyh0d859eb_0
- tinycss2=1.3.0=pyhd8ed1ab_0
- tk=8.6.13=noxft_h4845f30_101
- tomli=2.0.1=pyhd8ed1ab_0
- tornado=6.4=py312h98912ed_0
- traitlets=5.14.3=pyhd8ed1ab_0
- types-python-dateutil=2.9.0.20240316=pyhd8ed1ab_0
- typing-extensions=4.11.0=hd8ed1ab_0
- typing_extensions=4.11.0=pyha770c72_0
- typing_utils=0.1.0=pyhd8ed1ab_0
- tzdata=2024a=h0c530f3_0
- uri-template=1.3.0=pyhd8ed1ab_0
- urllib3=2.2.1=pyhd8ed1ab_0
- wcwidth=0.2.13=pyhd8ed1ab_0
- webcolors=1.13=pyhd8ed1ab_0
- webencodings=0.5.1=pyhd8ed1ab_2
- websocket-client=1.8.0=pyhd8ed1ab_0
- wheel=0.43.0=pyhd8ed1ab_1
- xz=5.2.6=h166bdaf_0
- yaml=0.2.5=h7f98852_2
- yarn=3.7.0=h31011fe_0
- zeromq=4.3.5=h75354e8_4
- zipp=3.17.0=pyhd8ed1ab_0
- zlib=1.2.13=hd590300_5
- pip:
- voila==0.5.7
prefix: /opt/miniconda/envs/voila

Command Line Output Output of jupyter server since running `voila` works
python -m jupyter_server 
[I 2024-05-27 13:07:06.434 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-05-27 13:07:06.436 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-05-27 13:07:06.439 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-05-27 13:07:06.441 ServerApp] notebook | extension was successfully linked.
/home/enzo/.local/lib/python3.12/site-packages/traitlets/traitlets.py:1897: DeprecationWarning: ServerApp.token config is deprecated in jupyter-server 2.0. Use IdentityProvider.token
  return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self))
[I 2024-05-27 13:07:06.582 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-05-27 13:07:06.583 ServerApp] voila.server_extension | extension was successfully linked.
[I 2024-05-27 13:07:06.590 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-05-27 13:07:06.591 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-05-27 13:07:06.592 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-05-27 13:07:06.593 LabApp] JupyterLab extension loaded from /opt/miniconda/envs/voila/lib/python3.12/site-packages/jupyterlab
[I 2024-05-27 13:07:06.593 LabApp] JupyterLab application directory is /opt/miniconda/envs/voila/share/jupyter/lab
[I 2024-05-27 13:07:06.593 LabApp] Extension Manager is 'pypi'.
[I 2024-05-27 13:07:06.601 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-05-27 13:07:06.604 ServerApp] notebook | extension was successfully loaded.
[I 2024-05-27 13:07:06.606 ServerApp] voila.server_extension | extension was successfully loaded.
[I 2024-05-27 13:07:06.606 ServerApp] Serving notebooks from local directory: /home/enzo/dev/voila/voila/notebooks
[I 2024-05-27 13:07:06.606 ServerApp] Jupyter Server 2.14.0 is running at:
[I 2024-05-27 13:07:06.606 ServerApp] http://localhost:8888/?token=0b74eec78a0b87794c030203c4b9c08fa7292746efb62384
[I 2024-05-27 13:07:06.606 ServerApp]     http://127.0.0.1:8888/?token=0b74eec78a0b87794c030203c4b9c08fa7292746efb62384
[I 2024-05-27 13:07:06.606 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2024-05-27 13:07:06.608 ServerApp] 
To access the server, open this file in a browser:
    file:///home/enzo/.local/share/jupyter/runtime/jpserver-22671-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/?token=0b74eec78a0b87794c030203c4b9c08fa7292746efb62384
    http://127.0.0.1:8888/?token=0b74eec78a0b87794c030203c4b9c08fa7292746efb62384

[I 2024-05-27 13:07:06.842 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-05-27 13:07:09.169 ServerApp] Kernel started: 05ef4034-697e-4c0e-8dbf-621ef758d99f
/home/enzo/dev/voila/voila/voila/exporter.py:53: RuntimeWarning: coroutine 'AsyncFileContentsManager.file_exists' was never awaited
if contents_manager.file_exists(src):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Task exception was never retrieved
future: <Task finished name='Task-36' coro=<VoilaHandler.get_generator..put_html() done, defined at /home/enzo/dev/voila/voila/voila/handler.py:240> exception=TypeError("'coroutine' object is not subscriptable")>
Traceback (most recent call last):
File "/home/enzo/dev/voila/voila/voila/handler.py", line 241, in put_html
async for html_snippet, _ in gen.generate_content_generator(
File "/home/enzo/dev/voila/voila/voila/exporter.py", line 158, in generate_from_notebook_node
async for output in self.template.generate_async(
File "/home/enzo/.local/lib/python3.12/site-packages/jinja2/environment.py", line 1376, in generate_async
yield self.environment.handle_exception()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/enzo/.local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/enzo/dev/voila/voila/share/jupyter/voila/templates/lab/index.html.j2", line 4, in top-level template code
{% from 'voila_setup.macro.html.j2' import voila_setup_helper_functions, voila_setup_labextensions with context %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/share/jupyter/nbconvert/templates/lab/index.html.j2", line 4, in top-level template code
{% from 'jupyter_widgets.html.j2' import jupyter_widgets %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/share/jupyter/nbconvert/templates/lab/base.html.j2", line 3, in top-level template code
{% from 'cell_id_anchor.j2' import cell_id_anchor %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/share/jupyter/nbconvert/templates/base/display_priority.j2", line 1, in top-level template code
{%- extends 'base/null.j2' -%}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/share/jupyter/nbconvert/templates/base/null.j2", line 26, in top-level template code
{%- block body -%}
File "/opt/miniconda/envs/voila/share/jupyter/nbconvert/templates/base/null.j2", line 29, in block 'body'
{%- block body_loop -%}
File "/home/enzo/dev/voila/voila/share/jupyter/voila/templates/lab/index.html.j2", line 106, in block 'body_loop'
{%- block any_cell scoped -%}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/enzo/dev/voila/voila/share/jupyter/voila/templates/lab/index.html.j2", line 111, in block 'any_cell'
{{ super() }}
File "/home/enzo/.local/lib/python3.12/site-packages/jinja2/async_utils.py", line 65, in auto_await
return await t.cast("t.Awaitable[V]", value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/share/jupyter/nbconvert/templates/base/null.j2", line 87, in block 'any_cell'
{%- block markdowncell scoped-%} {%- endblock markdowncell -%}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/share/jupyter/nbconvert/templates/lab/base.html.j2", line 109, in block 'markdowncell'
{%- set html_value=cell.source | markdown2html | strip_files_prefix -%}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/enzo/dev/voila/voila/voila/exporter.py", line 102, in markdown2html
return MarkdownWithMath(renderer=renderer).render(source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/nbconvert/filters/markdown_mistune.py", line 484, in render
return str(super().call(source))
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/markdown.py", line 110, in call
return self.parse(s)[0]
^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/markdown.py", line 90, in parse
result = self.render_state(state)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/markdown.py", line 48, in render_state
return self.renderer(data, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/core.py", line 209, in call
return self.render_tokens(tokens, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/core.py", line 206, in render_tokens
return ''.join(self.iter_tokens(tokens, state))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/core.py", line 203, in iter_tokens
yield self.render_token(tok, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/renderers/html.py", line 34, in render_token
text = self.render_tokens(token['children'], state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/core.py", line 206, in render_tokens
return ''.join(self.iter_tokens(tokens, state))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/core.py", line 203, in iter_tokens
yield self.render_token(tok, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda/envs/voila/lib/python3.12/site-packages/mistune/renderers/html.py", line 41, in render_token
return func(text, **attrs)
^^^^^^^^^^^^^^^^^^^
File "/home/enzo/dev/voila/voila/voila/exporter.py", line 55, in image
data = content["content"].replace("\n", "") # remove the newline
~~~~~~~^^^^^^^^^^^
TypeError: 'coroutine' object is not subscriptable

@EnzoPB EnzoPB added the bug Something isn't working label May 27, 2024
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

1 participant