-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Stars1233/mkdocs-material
#30Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
Context
No response
Bug description
If the privacy plugin cant download an external image the build process fails while trying to copy that file.
INFO - Downloading external file: https://squidfunk.github.io/mkdocs-material/assets/images/layers/3-astronaut-10.png
WARNING - Couldn't retrieve https://squidfunk.github.io/mkdocs-material/assets/images/layers/3-astronaut-10.png: 404 Client Error: Not Found for url:
https://squidfunk.github.io/mkdocs-material/assets/images/layers/3-astronaut-10.png
Traceback (most recent call last):
File "/home/<redacted>/mkdocmatrep/venv/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/mkdocs/__main__.py", line 288, in build_command
build.build(cfg, dirty=not clean)
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/mkdocs/commands/build.py", line 347, in build
config.plugins.on_post_build(config=config)
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/mkdocs/plugins.py", line 602, in on_post_build
return self.run_event('post_build', config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/mkdocs/plugins.py", line 568, in run_event
result = method(**kwargs)
^^^^^^^^^^^^^^^^
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/material/plugins/privacy/plugin.py", line 205, in on_post_build
file.copy_file()
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/mkdocs/structure/files.py", line 485, in copy_file
utils.copy_file(self.abs_src_path, output_path)
File "/home/<redacted>/mkdocmatrep/venv/lib/python3.12/site-packages/mkdocs/utils/__init__.py", line 123, in copy_file
shutil.copyfile(source_path, output_path)
File "/run/current-system/sw/lib/python3.12/shutil.py", line 260, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/<redacted>/mkdocmatrep/.cache/plugin/privacy/assets/external/squidfunk.github.io/mkdocs-material/assets/images/layers/3-astronaut-10.png'
Related links
- The code that fails
- Probably related but seems different: Privacy plugin crashes on HTTP errors #8012
- Built-in privacy plugin does not replace all external URLs #8040
Reproduction
9.6.7-privacy-image-missing.zip
Steps to reproduce
- Activate privacy plugin
- Have an external image that cant be downloaded
- Try to build
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open