Constantly getting this error - tried updating nbconvert, renaming filename nothing changed
[I 15:33:00.226 NotebookApp] Executing notebook with kernel:
[E 15:33:05.055 NotebookApp] Uncaught exception GET /voila/render/packt/Pycon_Ticket.ipynb (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/voila/render/packt/Pycon_Ticket.ipynb', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/tornado/web.py", line 1592, in _execute
result = yield result
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 1147, in run
yielded = self.gen.send(value)
File "/usr/local/lib/python3.7/site-packages/voila/handler.py", line 72, in get
contents_manager=self.contents_manager # for the image inlining
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/templateexporter.py", line 255, in __init__
super(TemplateExporter, self).__init__(config=config, **kw)
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 110, in __init__
self._init_preprocessors()
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 264, in _init_preprocessors
self.register_preprocessor(preprocessor, enabled=True)
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 225, in register_preprocessor
preprocessor_cls = import_item(preprocessor)
File "/usr/local/lib/python3.7/site-packages/traitlets/utils/importstring.py", line 34, in import_item
module = __import__(package, fromlist=[obj])
File "/usr/local/lib/python3.7/site-packages/voila/csspreprocessor.py", line 13, in <module>
from jupyterlab_pygments import JupyterStyle
File "/usr/local/lib/python3.7/site-packages/jupyterlab_pygments/__init__.py", line 9, in <module>
from .style import JupyterStyle
File "/usr/local/lib/python3.7/site-packages/jupyterlab_pygments/style.py", line 15, in <module>
class JupyterStyle(Style):
File "/usr/local/lib/python3.7/site-packages/pygments/style.py", line 101, in __new__
ndef[0] = colorformat(styledef)
File "/usr/local/lib/python3.7/site-packages/pygments/style.py", line 58, in colorformat
assert False, "wrong color format %r" % text
AssertionError: wrong color format 'var(--jp-mirror-editor-variable-color)'
[E 15:33:05.058 NotebookApp] {
"Host": "localhost:8888",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Accept-Encoding": "gzip, deflate",
"Referer": "http://localhost:8888/notebooks/packt/Pycon_Ticket.ipynb",
"Dnt": "1",
"Connection": "keep-alive",
"Cookie": "_xsrf=2|58f1b068|28140c23837c9512d832e3525966c02b|1558249854; username-localhost-8889=\"2|1:0|10:1558261312|23:username-localhost-8889|44:ZGY5YWNhYmVkNTQ2NDY5MmJjY2FmNzI5NzZlM2U0ZTA=|e44adcd433daffd52741d26d35ef82693f7e80bafd9ad5e57242a3196b84a894\"; username-localhost-8890=\"2|1:0|10:1559121785|23:username-localhost-8890|44:ODE4NDdhYmVhZjhhNGU4ZjkxZmZjMDk0NTQ5ZjRhMWQ=|35bac91886588eed67589be98fd75dc1e9ad61fc2b7004b8565ed8ef4bf44ee8\"; username-localhost-8888=\"2|1:0|10:1560333659|23:username-localhost-8888|44:NmRkZjg4MDY1ZDdlNDZmZjk2ZWI0YjczZjI5MjUzMjE=|158d33324e7cfe485b555743e5ced9dba2505856e543317dd5a7cd2bc9fdd3e0\"",
"Upgrade-Insecure-Requests": "1"
}
[E 15:33:05.058 NotebookApp] 500 GET /voila/render/packt/Pycon_Ticket.ipynb (127.0.0.1) 6264.64ms referer=http://localhost:8888/notebooks/packt/Pycon_Ticket.ipynb
Trying at Command-level leaves me with this error.
voila tiobeindexpy.ipynb
[Voila] Using /var/folders/j5/272v_6t54dz6mdgg51h5wnsm0000gn/T to store connection files
[Voila] Storing connection files in /var/folders/j5/272v_6t54dz6mdgg51h5wnsm0000gn/T/voila_xfu6nh0s.
[Voila] Serving static files from /usr/local/lib/python3.7/site-packages/voila/static.
[Voila] Voila is running at:
http://localhost:8866/
[Voila] Kernel started: 0d52332c-6cd9-4d87-8dd3-fa9e409a0111
[Voila] Executing notebook with kernel:
ERROR:tornado.application: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 "/usr/local/lib/python3.7/site-packages/tornado/web.py", line 1592, in _execute
result = yield result
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/usr/local/lib/python3.7/site-packages/tornado/gen.py", line 1147, in run
yielded = self.gen.send(value)
File "/usr/local/lib/python3.7/site-packages/voila/handler.py", line 72, in get
contents_manager=self.contents_manager # for the image inlining
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/templateexporter.py", line 255, in __init__
super(TemplateExporter, self).__init__(config=config, **kw)
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 110, in __init__
self._init_preprocessors()
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 264, in _init_preprocessors
self.register_preprocessor(preprocessor, enabled=True)
File "/usr/local/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 225, in register_preprocessor
preprocessor_cls = import_item(preprocessor)
File "/usr/local/lib/python3.7/site-packages/traitlets/utils/importstring.py", line 34, in import_item
module = __import__(package, fromlist=[obj])
File "/usr/local/lib/python3.7/site-packages/voila/csspreprocessor.py", line 13, in <module>
from jupyterlab_pygments import JupyterStyle
File "/usr/local/lib/python3.7/site-packages/jupyterlab_pygments/__init__.py", line 9, in <module>
from .style import JupyterStyle
File "/usr/local/lib/python3.7/site-packages/jupyterlab_pygments/style.py", line 15, in <module>
class JupyterStyle(Style):
File "/usr/local/lib/python3.7/site-packages/pygments/style.py", line 101, in __new__
ndef[0] = colorformat(styledef)
File "/usr/local/lib/python3.7/site-packages/pygments/style.py", line 58, in colorformat
assert False, "wrong color format %r" % text
AssertionError: wrong color format 'var(--jp-mirror-editor-variable-color)'
ERROR:tornado.general:Could not open static file '/base/images/favicon.ico'
ERROR:tornado.general:Could not open static file '/style/style.min.css'
ERROR:tornado.access:500 GET / (127.0.0.1) 11032.48ms
Same issue.
@amrrs @johntfoster thanks for the report.
Which version of voila are you using and how did you install it?
I'm using voila=0.1.2. I first installed via conda install -c conda-forge voila into a clean conda environment. I also tried pip install voila. Had the same error both times.
@amrrs updating pygments to the latest version should fix that issue.
For some reason you don't seem to have the required version, that is >=2.4.1.
@johntfoster are you seeing exactly the same error message in the console, or some issue related to the execution of your notebook?
Updating pygments did not resolve the issue. The error is in the console when running voila my_test_notebook.ipynb. The interactive widget works fine in the notebook. Console output is attached.
@SylvainCorlay - For me updating pygments solved the issue! Thank you!
@johntfoster would you mind sharing the output of your pip install voila?
It would be interesting to see if you get something like the following:
ERROR: jupyterlab-pygments 0.1.0 has requirement pygments<3,>=2.4.1, but you'll have pygments 2.3.1 which is incompatible.
experienced the same thing here...
@marcelo-ventura. Please let us know the error that you are seeing in the console.
If the notebook failed to run for any reason (including an exception in your code or a missing package) you will get error 500.
(base) path:notebooks marcelo$ voila bqplot.ipynb
[Voila] Using /var/folders/t7/j6n0jsqj35bf529gnf0tlm0r0000gn/T to store connection files
[Voila] Storing connection files in /var/folders/t7/j6n0jsqj35bf529gnf0tlm0r0000gn/T/voila_qpk8c8mp.
[Voila] Serving static files from /Users/marcelo/anaconda3/lib/python3.7/site-packages/voila/static.
[Voila] Voila is running at:
http://localhost:8866/
[Voila] WARNING | Notebook bqplot.ipynb is not trusted
[Voila] Kernel started: 1c4720f3-8a0e-42d8-8d05-14481a0c8b2c
[Voila] Executing notebook with kernel:
ERROR:tornado.application: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 "/Users/marcelo/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.send(value)
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/voila/handler.py", line 72, in get
contents_manager=self.contents_manager # for the image inlining
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/nbconvert/exporters/templateexporter.py", line 255, in __init__
super(TemplateExporter, self).__init__(config=config, **kw)
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 110, in __init__
self._init_preprocessors()
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 264, in _init_preprocessors
self.register_preprocessor(preprocessor, enabled=True)
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 225, in register_preprocessor
preprocessor_cls = import_item(preprocessor)
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/traitlets/utils/importstring.py", line 34, in import_item
module = __import__(package, fromlist=[obj])
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/voila/csspreprocessor.py", line 13, in <module>
from jupyterlab_pygments import JupyterStyle
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/jupyterlab_pygments/__init__.py", line 9, in <module>
from .style import JupyterStyle
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/jupyterlab_pygments/style.py", line 15, in <module>
class JupyterStyle(Style):
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/pygments/style.py", line 101, in __new__
ndef[0] = colorformat(styledef)
File "/Users/marcelo/anaconda3/lib/python3.7/site-packages/pygments/style.py", line 58, in colorformat
assert False, "wrong color format %r" % text
AssertionError: wrong color format 'var(--jp-mirror-editor-variable-color)'
ERROR:tornado.general:Could not open static file '/base/images/favicon.ico'
ERROR:tornado.general:Could not open static file '/style/style.min.css'
ERROR:tornado.access:500 GET / (127.0.0.1) 3802.30ms
^C[Voila] Stopping...
[Voila] Kernel shutdown: 1c4720f3-8a0e-42d8-8d05-14481a0c8b2c
@SylvainCorlay there you go!
btw experiencing error 500 in windows and macOS
It worked after I installed a template....this could help you guys @amrrs @johntfoster !
After I run this...
pip install voila-gridstack
Then I can get bqplot.ipynb working.
This was useful: https://blog.jupyter.org/and-voil脿-f6a2c08a4a93
Ok @marcelo-ventura. The issue is that you need to update pygments to 2.4.1 at least.
Ok @marcelo-ventura. The issue is that you need to update pygments to 2.4.1 at least.
I used pip install voila-gridstack and it worked....
It probably updated pygments.
Hello,
I'm tyring to work with Voil脿 on JupyterHub, always have 500 Internal error in big letters !
I tried to update pygments as suggested, and even installed voila-gridstack, still the same issue.
As I am not using JupyterHub with default port numbers, could this be an issue to Voil脿 rendering ?
Best
@DYSpider13 do you have access to the logs to see what is causing the 500 internal error?
Also maybe worth double checking the versions that are installed (with pip list or conda list)?
Same static file and assertion errors:
$ pip list
jupyter 1.0.0
jupyter-client 5.2.4
jupyter-console 6.0.0
jupyter-core 4.4.0
jupyter-server 0.0.5
jupyterhub 0.9.6
jupyterlab 0.35.5
jupyterlab-pygments 0.1.0
jupyterlab-server 0.2.0
nbconvert 5.5.0
Pygments 2.4.2
voila 0.1.3
voila-gridstack 0.0.4
errors
AssertionError: wrong color format 'var(--jp-mirror-editor-variable-color)'
ERROR:tornado.general:Could not open static file '/base/images/favicon.ico'
ERROR:tornado.general:Could not open static file '/style/style.min.css'
accessing via
http://localhost:8888/voila/render/1.%20Welcome.ipynb
*UPDATE
Restarted docker container and it worked. I'm guessing that the Tornado server is looking for paths when the container starts.
The issue with the assertion error in pygments occurs with pygments <2.4.1, while voila requires pygments >=2.4.1.
The issue with the assertion error in pygments occurs with pygments <2.4.1, while voila requires pygments >=2.4.1.
I'm still getting this error, even after updating pygments.
~/misc_notebooks$ voila test.ipynb
[Voila] Using /tmp to store connection files
[Voila] Storing connection files in /tmp/voila_f3lul4ru.
[Voila] Serving static files from /home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/voila/static.
[Voila] Voila is running at:
http://localhost:8866/
[Voila] WARNING | No web browser found: could not locate runnable browser.
[Voila] WARNING | Notebook cake_fusion_function.ipynb is not trusted
[Voila] Kernel started: e8018fad-8a34-4b2d-a8f6-0d97d04ce0aa
[Voila] Executing notebook with kernel:
ERROR:tornado.application:Uncaught exception GET / (10.11.63.205)
HTTPServerRequest(protocol='http', host='elvis:8866', method='GET', uri='/', version='HTTP/1.1', remote_ip='10.11.63.205')
Traceback (most recent call last):
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/tornado/gen.py", line 748, in run
yielded = self.gen.send(value)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/voila/handler.py", line 60, in get
result = executenb(notebook, km=km, cwd=cwd)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/voila/execute.py", line 133, in executenb
return ep.preprocess(nb, resources, km=km)[0]
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/voila/execute.py", line 88, in preprocess
result = super(ExecutePreprocessorWithOutputWidget, self).preprocess(nb, resources=resources, km=km)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 381, in preprocess
nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/nbconvert/preprocessors/base.py", line 69, in preprocess
nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 414, in preprocess_cell
reply, outputs = self.run_cell(cell, cell_index)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 516, in run_cell
self.process_message(msg, cell, cell_index)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 569, in process_message
self.handle_comm_msg(cell.outputs, msg, cell_index)
File "/home/malbert/miniconda3/envs/voila/lib/python3.7/site-packages/voila/execute.py", line 107, in handle_comm_msg
state = data['state']
KeyError: 'state'
ERROR:tornado.general:Could not open static file '/base/images/favicon.ico'
ERROR:tornado.general:Could not open static file '/style/style.min.css'
ERROR:tornado.access:500 GET / (10.11.63.205) 1356.58ms
output of pip list:
attrs 19.1.0
backcall 0.1.0
bleach 3.1.0
certifi 2019.6.16
cycler 0.10.0
decorator 4.4.0
defusedxml 0.5.0
entrypoints 0.3
ipykernel 5.1.1
ipython 7.6.1
ipython-genutils 0.2.0
jedi 0.14.1
Jinja2 2.10.1
jsonschema 3.0.1
jupyter-client 5.3.1
jupyter-core 4.4.0
jupyter-server 0.0.5
jupyterlab-pygments 0.1.0
kiwisolver 1.1.0
MarkupSafe 1.1.1
matplotlib 3.1.0
mistune 0.8.4
mkl-fft 1.0.12
mkl-random 1.0.2
nbconvert 5.5.0
nbformat 4.4.0
numpy 1.16.4
pandocfilters 1.4.2
parso 0.5.1
pexpect 4.7.0
pickleshare 0.7.5
pip 19.1.1
prometheus-client 0.7.1
prompt-toolkit 2.0.9
ptyprocess 0.6.0
Pygments 2.4.2
pyparsing 2.4.0
pyrsistent 0.15.3
python-dateutil 2.8.0
pytz 2019.1
pyzmq 18.0.2
scipy 1.2.1
Send2Trash 1.5.0
setuptools 41.0.1
six 1.12.0
terminado 0.8.2
testpath 0.4.2
tornado 6.0.3
traitlets 4.3.2
voila 0.1.7
wcwidth 0.1.7
webencodings 0.5.1
wheel 0.33.4
Thanks for any hints!
Upgrade pygments helps
Most helpful comment
Trying at Command-level leaves me with this error.