Our custom theme was released with an empty mkdocs_theme.yml file in the root of the theme directory. The user experienced the following AttributeError when the mkdocs serve command was executed:
Traceback (most recent call last):
File "/usr/local/bin/mkdocs", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/mkdocs/__main__.py", line 134, in serve_command
livereload=livereload
File "/usr/local/lib/python3.5/dist-packages/mkdocs/commands/serve.py", line 119, in serve
config = builder()
File "/usr/local/lib/python3.5/dist-packages/mkdocs/commands/serve.py", line 107, in builder
site_dir=site_dir
File "/usr/local/lib/python3.5/dist-packages/mkdocs/config/base.py", line 197, in load_config
errors, warnings = cfg.validate()
File "/usr/local/lib/python3.5/dist-packages/mkdocs/config/base.py", line 115, in validate
post_failed, post_warnings = self._post_validate()
File "/usr/local/lib/python3.5/dist-packages/mkdocs/config/base.py", line 95, in _post_validate
config_option.post_validation(self, key_name=key)
File "/usr/local/lib/python3.5/dist-packages/mkdocs/config/config_options.py", line 432, in post_validation
config[key_name] = theme.Theme(**theme_config)
File "/usr/local/lib/python3.5/dist-packages/mkdocs/theme.py", line 47, in __init__
self._load_theme_config(name)
File "/usr/local/lib/python3.5/dist-packages/mkdocs/theme.py", line 96, in _load_theme_config
parent_theme = theme_config.pop('extends', None)
AttributeError: 'NoneType' object has no attribute 'pop'
Reported by @Martian101 on the Cinder theme repository here chrissimpkins/cinder#46.
Our custom theme was released with an empty
mkdocs_theme.yml
file in the root of the theme directory. The user experienced the followingAttributeError
when themkdocs serve
command was executed:According to your documentation, an empty settings file appears to be acceptable and supported (https://www.mkdocs.org/user-guide/custom-themes/#theme-configuration) so I am reporting as a possible bug or need for documentation update here.
The text was updated successfully, but these errors were encountered: