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

[BUG] Error with jinja2 app Template not found:index.html.j2 #82

Closed
mlabadie opened this issue Sep 29, 2022 · 2 comments
Closed

[BUG] Error with jinja2 app Template not found:index.html.j2 #82

mlabadie opened this issue Sep 29, 2022 · 2 comments
Assignees

Comments

@mlabadie
Copy link
Collaborator

Error of jinja2 template when i run strawberry application

C:\Users\mlabadie\Documents\GitHub\strawberry\src\openalea\strawberry\application>voila "Strawberry Application.ipynb" --template vuetify-default --VoilaConfiguration.enable_nbextensions=True --VoilaConfiguration.file_whitelist="['.*\.(png|jpg|gif|svg|mp4|avi|ogg|html|py|js)']"

ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-6' coro=<VoilaHandler.get_generator.<locals>.put_html() done, defined at C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\voila\handler.py:202> exception=TemplateNotFound('index.html.j2')>
Traceback (most recent call last):
  File "C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\voila\handler.py", line 203, in put_html
    async for html_snippet, _ in gen.generate_content_generator(kernel_id, kernel_future):
  File "C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\voila\exporter.py", line 101, in generate_from_notebook_node
    async for output in self.template.generate_async(nb=nb_copy, resources=resources, **extra_context, static_url=self.static_url):
  File "C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\nbconvert\exporters\templateexporter.py", line 150, in template
    self._template_cached = self._load_template()
  File "C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\nbconvert\exporters\templateexporter.py", line 361, in _load_template
    return self.environment.get_template(template_file)
  File "C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\jinja2\environment.py", line 997, in get_template
    return self._load_template(name, globals)
  File "C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\jinja2\environment.py", line 958, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
  File "C:\Users\mlabadie\miniconda3\envs\straws\lib\site-packages\jinja2\loaders.py", line 566, in load
    raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: index.html.j2
```
@mlabadie mlabadie self-assigned this Sep 29, 2022
@mlabadie
Copy link
Collaborator Author

mlabadie commented Sep 29, 2022

the error comes from the vuetify-default template on windows the template is not found.
It is however possible to launch the application without the template

"Strawberry Application.ipynb" --VoilaConfiguration.enable_nbextensions=True --VoilaConfiguration.file_whitelist="['.*\.(png|jpg|gif|svg|mp4|avi|ogg|html|py|js)']

@mlabadie
Copy link
Collaborator Author

To solve this bug please install voila-vuetify with pip
pip install voila-vuetify

@pradal pradal closed this as completed Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants