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

[bootstrap3-jinja] Exception: Can't find theme 'bootstrap3' #170

Open
davidak opened this issue Apr 22, 2019 · 1 comment
Open

[bootstrap3-jinja] Exception: Can't find theme 'bootstrap3' #170

davidak opened this issue Apr 22, 2019 · 1 comment

Comments

@davidak
Copy link

davidak commented Apr 22, 2019

It seems i can't install the theme because it is not installed.

[davidak@X230:~/code/webseite]$ nikola theme -i bootstrap3-jinja
[2019-04-22T18:04:48Z] WARNING: Nikola: The sections feature has been removed and its functionality has been merged into categories.
[2019-04-22T18:04:48Z] WARNING: Nikola: For more information on how to migrate, please read: https://getnikola.com/blog/upgrading-to-nikola-v8.html#sections-were-replaced-by-categories
[2019-04-22T18:04:48Z] INFO: Nikola: Setting CATEGORY_DESTPATH_AS_DEFAULT = True
[2019-04-22T18:04:49Z] WARNING: Nikola: Cannot load theme "bootstrap3-jinja", using 'bootblog4' instead.
Traceback (most recent call last):
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/nikola.py", line 1229, in _get_themes
    self._THEMES = utils.get_theme_chain(self.config['THEME'], self.themes_dirs)
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/utils.py", line 700, in get_theme_chain
    themes = [get_theme_path_real(theme, themes_dirs)]
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/utils.py", line 642, in get_theme_path_real
    raise Exception("Can't find theme '{0}'".format(theme))
Exception: Can't find theme 'bootstrap3-jinja'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/xz8cmgfwjsfmfpnwm0lnvqymyrnrhgpg-python3.7-Nikola-8.0.2/bin/.nikola-wrapped", line 11, in <module>
    sys.exit(main())
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/__main__.py", line 166, in main
    _ = DN.run(oargs)
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/__main__.py", line 342, in run
    self.nikola.init_plugins()
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/nikola.py", line 998, in init_plugins
    self._activate_plugins_of_category("PostScanner")
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/nikola.py", line 1222, in _activate_plugins_of_category
    plugin_info.plugin_object.set_site(self)
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/plugin_categories.py", line 73, in set_site
    self.inject_templates()
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/plugin_categories.py", line 85, in inject_templates
    mod_dir, 'templates', self.site.template_system.name
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/nikola.py", line 1285, in _get_template_system
    template_sys_name = utils.get_template_engine(self.THEMES)
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/nikola.py", line 1235, in _get_themes
    return self._get_themes()
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/nikola.py", line 1229, in _get_themes
    self._THEMES = utils.get_theme_chain(self.config['THEME'], self.themes_dirs)
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/utils.py", line 703, in get_theme_chain
    parent = get_parent_theme_name(themes[-1], themes_dirs=themes_dirs)
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/utils.py", line 684, in get_parent_theme_name
    return get_theme_path_real(parent, themes_dirs)
  File "/nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/utils.py", line 642, in get_theme_path_real
    raise Exception("Can't find theme '{0}'".format(theme))
Exception: Can't find theme 'bootstrap3'

Or does it has to be included in the package?

[davidak@X230:~/code/webseite]$ ll /nix/store/w0a1z0vcrwsc23928gvybv47mb56dycq-python3-3.7.3-env/lib/python3.7/site-packages/nikola/data/themes/
total 24
dr-xr-xr-x 5 root root 4096  1. Jan 1970  base
dr-xr-xr-x 3 root root 4096  1. Jan 1970  base-jinja
dr-xr-xr-x 4 root root 4096  1. Jan 1970  bootblog4
dr-xr-xr-x 4 root root 4096  1. Jan 1970  bootblog4-jinja
dr-xr-xr-x 4 root root 4096  1. Jan 1970  bootstrap4
dr-xr-xr-x 4 root root 4096  1. Jan 1970  bootstrap4-jinja

@Kwpolska
Copy link
Member

Cannot reproduce with Nikola from master, even with THEME = 'bootstrap3-jinja'

$ nikola theme -i bootstrap3-jinja
[2019-04-22T18:24:26Z] WARNING: Nikola: Cannot load theme "bootstrap3-jinja", using 'bootblog4' instead.
[2019-04-22T18:24:26Z] INFO: theme: Downloading 'https://themes.getnikola.com/v8/bootstrap3-jinja.zip'
[2019-04-22T18:24:28Z] INFO: theme: Extracting 'bootstrap3-jinja' into themes/
[2019-04-22T18:24:28Z] NOTICE: theme: Remember to set THEME="bootstrap3-jinja" in conf.py to use this theme.

After that, nikola build succeeds.

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