You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... the problem doesn't occur with the mkdocs or readthedocs themes
... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
... the documentation does not mention anything about my problem
... there are no open or closed issues that are related to my problem
Description
According to the docs, I should be able to include the tags plugin without also including a tags_file. This worked until recently when I encountered an error running mkdocs build.
Expected behaviour
mkdocs build should render the site even if tags_file is excluded.
Actual behaviour
mkdocs.yml
...
plugins:
- tags
error
(venv) bgorman@Bens-MacBook-Pro practice-probs % python3 -m mkdocs build
INFO - Cleaning site directory
INFO - Building documentation to directory: /Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/site
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/mkdocs/__main__.py", line 236, in <module>
cli()
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/mkdocs/__main__.py", line 192, in build_command
build.build(config.load_config(**kwargs), dirty=not clean)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/mkdocs/commands/build.py", line 287, in build
nav = config['plugins'].run_event('nav', nav, config=config, files=files)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/mkdocs/plugins.py", line 102, in run_event
result = method(item, **kwargs)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/material/plugins/tags/plugin.py", line 70, in on_nav
self.tags_file = self._get_tags_file(files, file)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/material/plugins/tags/plugin.py", line 108, in _get_tags_file
file = files.get_file_from_path(path)
File "/Users/bgorman/Dropbox (GormAnalysis)/Practice Probs/practice-probs/venv/lib/python3.9/site-packages/mkdocs/structure/files.py", line 32, in get_file_from_path
return self.src_paths.get(os.path.normpath(path))
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/posixpath.py", line 336, in normpath
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Steps to reproduce
Stand up a Hello World project
Insert the tags plugin inside mkdocs.yml
plugins:
- tags
Attempt to build the site
python3 -m mkdocs build
Package versions
Python: python --version: Python 3.9.13 (also tested on 3.10)
MkDocs: mkdocs --version: 1.3.0
Material: pip show mkdocs-material | grep -E ^Version: Version: 8.3.9+insiders.4.20.0
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
According to the docs, I should be able to include the tags plugin without also including a tags_file. This worked until recently when I encountered an error running
mkdocs build
.Expected behaviour
mkdocs build
should render the site even iftags_file
is excluded.Actual behaviour
mkdocs.yml
error
Steps to reproduce
mkdocs.yml
Package versions
python --version
: Python 3.9.13 (also tested on 3.10)mkdocs --version
: 1.3.0pip show mkdocs-material | grep -E ^Version
: Version: 8.3.9+insiders.4.20.0Configuration
System information
The text was updated successfully, but these errors were encountered: