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

Give an error when a template is not found #137

Merged

Conversation

maartenbreddels
Copy link
Member

Closes #129
Example:

$ voila notebooks/basics.ipynb  --template=bla   
Traceback (most recent call last):
  File "/Users/maartenbreddels/miniconda3/envs/voila/bin/voila", line 11, in <module>
    load_entry_point('voila', 'console_scripts', 'voila')()
  File "/Users/maartenbreddels/miniconda3/envs/voila/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "/Users/maartenbreddels/src/QuantStack/voila/voila/app.py", line 294, in initialize
    self.setup_template_dirs()
  File "/Users/maartenbreddels/src/QuantStack/voila/voila/app.py", line 303, in setup_template_dirs
    self.template)
  File "/Users/maartenbreddels/src/QuantStack/voila/voila/paths.py", line 78, in collect_template_paths
    raise ValueError('No template sub-directory with name %r found in the following paths:\n\t%s' % (template_name, paths))
ValueError: No template sub-directory with name 'bla' found in the following paths:
	/Users/maartenbreddels/src/QuantStack/voila/share/jupyter/voila/template
	/Users/maartenbreddels/Library/Jupyter/voila/template
	/Users/maartenbreddels/miniconda3/envs/voila/share/jupyter/voila/template
	/usr/local/share/jupyter/voila/template
	/usr/share/jupyter/voila/template

@SylvainCorlay
Copy link
Member

This looks good to me.

@maartenbreddels maartenbreddels merged commit 67221e6 into voila-dashboards:master May 15, 2019
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

Successfully merging this pull request may close these issues.

Throw an error when a custom template is given but not found
2 participants