Folks,
I’ve python and Jupyter notebook set up on an Ubuntu 16.04. Notebooks seem to work fine.
I installed voila using ‘pip3 install voila’.
However, voila gives me the following error on any notebook that I try out:
Exception in thread Thread-2:
Traceback (most recent call last):
File “/usr/lib/python3.5/threading.py”, line 914, in _bootstrap_inner
self.run()
File “/home//.local/lib/python3.5/site-packages/voila/threading.py”, line 23, in run
return ioloop_in_thread.run_until_complete(self._run())
File “/usr/lib/python3.5/asyncio/base_events.py”, line 387, in run_until_complete
return future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 274, in result
raise self._exception
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/home//.local/lib/python3.5/site-packages/voila/threading.py”, line 26, in _run
async for item in self.fn(*self.args, **self.kwargs):
File “/home//.local/lib/python3.5/site-packages/async_generator/_impl.py”, line 366, in step
return await ANextIter(self._it, start_fn, *args)
File “/home//.local/lib/python3.5/site-packages/async_generator/_impl.py”, line 197, in next
return self._invoke(first_fn, *first_args)
File “/home//.local/lib/python3.5/site-packages/async_generator/_impl.py”, line 209, in _invoke
result = fn(*args)
File “/home//.local/lib/python3.5/site-packages/voila/exporter.py”, line 119, in async_jinja_generator
for output in self.template.generate(nb=nb_copy, resources=resources, **extra_context):
File “/usr/local/lib/python3.5/dist-packages/nbconvert/exporters/templateexporter.py”, line 114, in template
self._template_cached = self._load_template()
File “/usr/local/lib/python3.5/dist-packages/nbconvert/exporters/templateexporter.py”, line 293, in _load_template
return self.environment.get_template(template_file)
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 812, in get_template
return self._load_template(name, self.make_globals(globals))
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 786, in _load_template
template = self.loader.load(self, name, globals)
File “/usr/lib/python3/dist-packages/jinja2/loaders.py”, line 405, in load
return loader.load(environment, name, globals)
File “/usr/lib/python3/dist-packages/jinja2/loaders.py”, line 125, in load
code = environment.compile(source, name, filename)
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 565, in compile
self.handle_exception(exc_info, source_hint=source_hint)
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/compat.py", line 37, in reraise
raise value.with_traceback(tb)
File “/home//.local/share/jupyter/voila/templates/default/nbconvert_templates/voila.tpl”, line 71, in template
{%- with kernel_id = kernel_start() -%}
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 470, in parse
return Parser(self, source, name, encode_filename(filename)).parse()
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 897, in parse
result = nodes.Template(self.subparse(), lineno=1)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 879, in subparse
rv = self.parse_statement()
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 121, in parse_statement
return getattr(self, 'parse’ + self.stream.current.value)()
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 231, in parse_block
node.body = self.parse_statements((‘name:endblock’,), drop_needle=True)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 156, in parse_statements
result = self.subparse(end_tokens)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 879, in subparse
rv = self.parse_statement()
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 121, in parse_statement
return getattr(self, 'parse’ + self.stream.current.value)()
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 231, in parse_block
node.body = self.parse_statements((‘name:endblock’,), drop_needle=True)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 156, in parse_statements
result = self.subparse(end_tokens)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 879, in subparse
rv = self.parse_statement()
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 135, in parse_statement
self.fail_unknown_tag(token.value, token.lineno)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 88, in fail_unknown_tag
return self._fail_ut_eof(name, self._end_token_stack, lineno)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 81, in _fail_ut_eof
self.fail(’ '.join(message), lineno)
File “/usr/lib/python3/dist-packages/jinja2/parser.py”, line 50, in fail
raise exc(msg, lineno, self.name, self.filename)
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag ‘with’. Jinja was looking for the following tags: ‘endblock’. The innermost block that needs to be closed is ‘block’.
This has nothing to do with the notebook, it happens on any notebook I try (including the example notebook in voila basics.ipynb)
Any pointers?
Thanks!