Having issues with latest Voila examples on both Mac and Linux

Using the latest python 3 on Mac and linux im running into these issues when I try to render the basic example from the voila GitHub. The page loads and widgets work fine but when I start voila the widgets dont render

Here is my pip list

Package                Version             
---------------------- --------------------
aenum                  3.1.0               
anyio                  3.6.1               
apturl                 0.5.2               
argon2-cffi            21.3.0              
argon2-cffi-bindings   21.2.0              
argparse-addons        0.7.0               
asttokens              2.0.8               
attrs                  22.1.0              
Babel                  2.10.3              
backcall               0.2.0               
bcrypt                 3.1.7               
beautifulsoup4         4.11.1              
bitstruct              8.11.1              
bleach                 5.0.1               
blinker                1.4                 
bqplot                 0.12.36             
Brlapi                 0.7.0               
cantools               36.2.0              
certifi                2019.11.28          
cffi                   1.15.1              
chardet                3.0.4               
Click                  7.0                 
colorama               0.4.3               
command-not-found      0.3                 
cryptography           2.8                 
cupshelpers            1.0                 
cycler                 0.10.0              
dbus-python            1.2.16              
debugpy                1.6.3               
decorator              5.1.1               
defer                  1.0.6               
defusedxml             0.7.1               
diskcache              5.2.1               
distro                 1.4.0               
distro-info            0.23ubuntu1         
duplicity              0.8.12.0            
entrypoints            0.3                 
executing              1.1.0               
fasteners              0.14.1              
fastjsonschema         2.16.2              
future                 0.18.2              
httplib2               0.14.0              
idna                   2.8                 
importlib-metadata     4.12.0              
importlib-resources    5.9.0               
ipykernel              6.16.0              
ipython                8.5.0               
ipython-genutils       0.2.0               
ipywidgets             8.0.2               
jedi                   0.18.1              
Jinja2                 3.1.2               
json5                  0.9.10              
jsonschema             4.16.0              
jupyter-client         7.3.5               
jupyter-core           4.11.1              
jupyter-server         1.19.1              
jupyterlab             3.4.7               
jupyterlab-pygments    0.2.2               
jupyterlab-server      2.15.2              
jupyterlab-widgets     3.0.3               
keyring                18.0.1              
kiwisolver             1.3.1               
language-selector      0.1                 
launchpadlib           1.10.13             
lazr.restfulclient     0.14.2              
lazr.uri               1.0.3               
lockfile               0.12.2              
louis                  3.12.0              
lxml                   4.9.1               
macaroonbakery         1.3.1               
Mako                   1.1.0               
MarkupSafe             2.1.1               
matplotlib             3.4.2               
matplotlib-inline      0.1.6               
mistune                0.8.4               
monotonic              1.5                 
nbclassic              0.4.3               
nbclient               0.5.13              
nbconvert              6.5.4               
nbformat               5.6.1               
nest-asyncio           1.5.5               
netifaces              0.10.4              
notebook               6.4.12              
notebook-shim          0.1.0               
numpy                  1.20.3              
oauthlib               3.1.0               
olefile                0.46                
packaging              21.3                
pandas                 1.5.0               
pandocfilters          1.5.0               
paramiko               2.6.0               
parso                  0.8.3               
pexpect                4.6.0               
pickleshare            0.7.5               
Pillow                 7.0.0               
pip                    20.0.2              
pkgutil-resolve-name   1.3.10              
prometheus-client      0.14.1              
prompt-toolkit         3.0.31              
protobuf               3.6.1               
psutil                 5.9.2               
ptyprocess             0.7.0               
pure-eval              0.2.2               
pycairo                1.16.2              
pycparser              2.21                
pycups                 1.9.73              
Pygments               2.13.0              
PyGObject              3.36.0              
PyJWT                  1.7.1               
pymacaroons            0.13.0              
PyNaCl                 1.3.0               
pyparsing              2.4.7               
pyRFC3339              1.1                 
pyrsistent             0.18.1              
python-apt             2.0.0+ubuntu0.20.4.8
python-can             3.3.4               
python-dateutil        2.8.2               
python-debian          0.1.36ubuntu1       
pytz                   2022.2.1            
pyxdg                  0.26                
PyYAML                 5.3.1               
pyzmq                  24.0.1              
reportlab              3.5.34              
requests               2.22.0              
requests-unixsocket    0.2.0               
SecretStorage          2.3.1               
Send2Trash             1.8.0               
setuptools             45.2.0              
simplejson             3.16.0              
six                    1.14.0              
sniffio                1.3.0               
soupsieve              2.3.2.post1         
ssh-import-id          5.10                
stack-data             0.5.1               
systemd-python         234                 
terminado              0.15.0              
textparser             0.23.0              
tinycss2               1.1.1               
tomli                  2.0.1               
tornado                6.2                 
traitlets              5.4.0               
traittypes             0.2.1               
ubuntu-advantage-tools 20.3                
ubuntu-drivers-common  0.0.0               
ufw                    0.36                
unattended-upgrades    0.1                 
urllib3                1.25.8              
usb-creator            0.3.7               
viola                  0.3.8               
voila                  0.3.6               
wadllib                1.3.3               
wcwidth                0.2.5               
webencodings           0.5.1               
websocket-client       1.4.1               
websockets             10.3                
wheel                  0.34.2              
widgetsnbextension     4.0.3               
wrapt                  1.12.1              
xkit                   0.0.0               
zipp                   3.8.1               

from the Javascript log →

[Error] Could not instantiate widget
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:203721)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/base, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/base, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/base, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	(anonymous function) (basics.ipynb:45)
	(anonymous function) (voila.js:23:206167)
	(anonymous function) (voila.js:23:200145)
	s (voila.js:23:199035)
	promiseReactionJob
[Error] Unhandled Promise Rejection: Error: Module @jupyter-widgets/base, semver range ^2.0.0 is not registered as a widget module
	promiseEmptyOnRejected (voila.js:490:81479)
	promiseReactionJob
[Error] Unhandled Promise Rejection: Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	promiseEmptyOnRejected (voila.js:490:81479)
	promiseReactionJob
[Error] Unhandled Promise Rejection: Error: Module @jupyter-widgets/base, semver range ^2.0.0 is not registered as a widget module
	promiseEmptyOnRejected (voila.js:490:81479)
	promiseReactionJob
[Error] Unhandled Promise Rejection: Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	promiseEmptyOnRejected (voila.js:490:81479)
	promiseReactionJob
[Error] Unhandled Promise Rejection: Error: Module @jupyter-widgets/base, semver range ^2.0.0 is not registered as a widget module
	promiseEmptyOnRejected (voila.js:490:81479)
	promiseReactionJob
[Error] Unhandled Promise Rejection: Error: Module @jupyter-widgets/controls, semver range ^2.0.0 is not registered as a widget module
	promiseEmptyOnRejected (voila.js:490:81479)
	promiseReactionJob
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (voila.js.map, line 0)

For now, you may have to stick with ipywidgets<8 until more widget libraries are updated.

1 Like

new errors with updated ipywidgets version, Is there a list of deps with working versions anywhere for voila? cant find it

bischofs@ubuntu:~/voila$ voila notebooks/basics.ipynb 
[Voila] Using /tmp to store connection files
[Voila] Storing connection files in /tmp/voila_eri31hmq.
[Voila] Serving static files from /home/bischofs/.local/lib/python3.8/site-packages/voila/static.
[Voila] Voilà is running at:
http://localhost:8866/
Uncaught exception GET / (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8866', method='GET', uri='/', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/utils/importstring.py", line 32, in import_item
    pak = getattr(module, obj)
AttributeError: module 'mistune' has no attribute 'Renderer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bischofs/.local/lib/python3.8/site-packages/tornado/web.py", line 1713, in _execute
    result = await result
  File "/home/bischofs/.local/lib/python3.8/site-packages/voila/handler.py", line 226, in get
    async for html in gen:
  File "/home/bischofs/.local/lib/python3.8/site-packages/voila/handler.py", line 176, in get_generator
    await gen.initialize(template=template_arg, theme=theme_arg)
  File "/home/bischofs/.local/lib/python3.8/site-packages/voila/notebook_renderer.py", line 132, in initialize
    self.exporter = VoilaExporter(
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1183, in __new__
    inst.setup_instance(*args, **kwargs)
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1224, in setup_instance
    super(HasTraits, self).setup_instance(*args, **kwargs)
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1206, in setup_instance
    value.instance_init(self)
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1952, in instance_init
    self._resolve_classes()
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1957, in _resolve_classes
    self.klass = self._resolve_string(self.klass)
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/traitlets.py", line 1872, in _resolve_string
    return import_item(string)
  File "/home/bischofs/.local/lib/python3.8/site-packages/traitlets/utils/importstring.py", line 34, in import_item
    raise ImportError("No module named %s" % obj)
ImportError: No module named Renderer
500 GET / (127.0.0.1) 496.22ms

updated pip list

Package                Version             
---------------------- --------------------
aenum                  3.1.0               
anyio                  3.6.1               
apturl                 0.5.2               
argon2-cffi            21.3.0              
argon2-cffi-bindings   21.2.0              
argparse-addons        0.7.0               
args                   0.1.0               
asttokens              2.0.8               
attrs                  22.1.0              
Babel                  2.10.3              
backcall               0.2.0               
bcrypt                 3.1.7               
beautifulsoup4         4.11.1              
bitstruct              8.11.1              
bleach                 5.0.1               
blinker                1.4                 
bqplot                 0.12.36             
Brlapi                 0.7.0               
cantools               36.2.0              
certifi                2019.11.28          
cffi                   1.15.1              
chardet                3.0.4               
Click                  7.0                 
clint                  0.5.1               
colorama               0.4.3               
command-not-found      0.3                 
conda                  4.3.16              
coverage               6.4.4               
cryptography           2.8                 
cupshelpers            1.0                 
cycler                 0.10.0              
dbus-python            1.2.16              
debugpy                1.6.3               
decorator              5.1.1               
defer                  1.0.6               
defusedxml             0.7.1               
diskcache              5.2.1               
distro                 1.4.0               
distro-info            0.23ubuntu1         
duplicity              0.8.12.0            
entrypoints            0.4                 
executing              1.1.0               
fasteners              0.14.1              
fastjsonschema         2.16.2              
future                 0.18.2              
httplib2               0.14.0              
idna                   2.8                 
importlib-metadata     4.12.0              
importlib-resources    5.9.0               
ipydatawidgets         4.3.2               
ipykernel              6.16.0              
ipython                8.5.0               
ipython-genutils       0.2.0               
ipyvolume              0.5.2               
ipywebrtc              0.6.0               
ipywidgets             7.7.2               
jedi                   0.18.1              
Jinja2                 3.1.2               
json5                  0.9.10              
jsonschema             4.16.0              
jupyter-client         7.3.5               
jupyter-core           4.11.1              
jupyter-server         1.19.1              
jupyterlab             3.4.7               
jupyterlab-pygments    0.2.2               
jupyterlab-server      2.15.2              
jupyterlab-widgets     1.1.1               
keyring                18.0.1              
kiwisolver             1.3.1               
language-selector      0.1                 
launchpadlib           1.10.13             
lazr.restfulclient     0.14.2              
lazr.uri               1.0.3               
lockfile               0.12.2              
louis                  3.12.0              
lxml                   4.9.1               
macaroonbakery         1.3.1               
Mako                   1.1.0               
MarkupSafe             2.1.1               
matplotlib             3.4.2               
matplotlib-inline      0.1.6               
mistune                2.0.4               
monotonic              1.5                 
nbclassic              0.4.3               
nbclient               0.6.8               
nbconvert              7.0.0               
nbformat               5.6.1               
nest-asyncio           1.5.5               
netifaces              0.10.4              
notebook               6.4.12              
notebook-shim          0.1.0               
numpy                  1.20.3              
oauthlib               3.1.0               
olefile                0.46                
packaging              21.3                
pandas                 1.5.0               
pandocfilters          1.5.0               
paramiko               2.6.0               
parso                  0.8.3               
pexpect                4.8.0               
pickleshare            0.7.5               
Pillow                 7.0.0               
pip                    20.0.2              
pkgutil-resolve-name   1.3.10              
prometheus-client      0.14.1              
prompt-toolkit         3.0.31              
protobuf               3.6.1               
psutil                 5.9.2               
ptyprocess             0.7.0               
pure-eval              0.2.2               
pycairo                1.16.2              
pycosat                0.6.3               
pycparser              2.21                
pycups                 1.9.73              
Pygments               2.13.0              
PyGObject              3.36.0              
PyJWT                  1.7.1               
pymacaroons            0.13.0              
PyNaCl                 1.3.0               
pyparsing              3.0.9               
pyRFC3339              1.1                 
pyrsistent             0.18.1              
python-apt             2.0.0+ubuntu0.20.4.8
python-can             3.3.4               
python-dateutil        2.8.2               
python-debian          0.1.36ubuntu1       
pythreejs              2.4.1               
pytz                   2022.2.1            
pyxdg                  0.26                
PyYAML                 5.3.1               
pyzmq                  24.0.1              
reportlab              3.5.34              
requests               2.22.0              
requests-unixsocket    0.2.0               
ruamel.yaml            0.17.21             
ruamel.yaml.clib       0.2.6               
scipy                  1.9.1               
SecretStorage          2.3.1               
Send2Trash             1.8.0               
setuptools             45.2.0              
simplejson             3.16.0              
six                    1.16.0              
sniffio                1.3.0               
soupsieve              2.3.2.post1         
ssh-import-id          5.10                
stack-data             0.5.1               
systemd-python         234                 
terminado              0.15.0              
textparser             0.23.0              
tinycss2               1.1.1               
tomli                  2.0.1               
tornado                6.2                 
traitlets              5.4.0               
traittypes             0.2.1               
ubuntu-advantage-tools 20.3                
ubuntu-drivers-common  0.0.0               
ufw                    0.36                
unattended-upgrades    0.1                 
urllib3                1.25.8              
usb-creator            0.3.7               
viola                  0.3.8               
voila                  0.3.6               
wadllib                1.3.3               
wcwidth                0.2.5               
webencodings           0.5.1               
websocket-client       1.4.1               
websockets             10.3                
wheel                  0.34.2              
widgetsnbextension     3.6.1               
wrapt                  1.12.1              
xkit                   0.0.0               
yml                    0.0.1               
zipp                   3.8.1 

Looks like you may need to pin nbconvert<7. This is not really recommended, and might be worth taking up with the team. You’d probably want a minimum reproducer working on binder as well.