Traceback (most recent call last):
File "/home/chapichapo/.venv/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/home/chapichapo/.venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/chapichapo/.venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/mkdocs/__main__.py", line 286, in build_command
build.build(cfg, dirty=not clean)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 354, in build
config.plugins.on_post_build(config=config)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/mkdocs/plugins.py", line 542, in on_post_build
return self.run_event('post_build', config=config)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/mkdocs/plugins.py", line 509, in run_event
result = method(**kwargs)
File "/home/chapichapo/.venv/lib/python3.10/site-packages/encryptcontent/plugin.py", line 1117, in on_post_build
with open(self.setup['cache_file'], 'w') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/home/chapichapo/.cache/plugins/encryptcontent/encryptcontent.cache'
First of all, thank you for this very useful and comprehensive plugin! Nice work!
I'm facing an issue when trying to store the cache_file into a
.cache/plugins/encryptcontent/
folder that does not exist at build time.To reproduce
Set cache_file to a path that does not exist yet:
build:
mkdocs build
It fails.
Error log
Workaround
Create the folder before.