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
ERROR - Error building page 'README.md': 'href'
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.10.10/x64/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/mkdocs/__main__.py", line 250, in build_command
build.build(cfg, dirty=not clean)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/mkdocs/commands/build.py", line 329, in build
_build_page(file.page, config, doc_files, nav, env, dirty)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/mkdocs/commands/build.py", line 234, in _build_page
output = config.plugins.run_event('post_page', output, page=page, config=config)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/mkdocs/plugins.py", line 520, in run_event
result = method(item, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/mkdocs_exclude_unused_files/plugin.py", line 62, in on_post_page
self.asset_files.discard(str(Path(path.join(path.dirname(page.file.abs_dest_path), unquote(file['href']))).resolve()))
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/bs4/element.py", line 1529, in __getitem__
return self.attrs[key]
KeyError: 'href'
If html output contains namespace e.g.
<a xlink:href="./foo/bar/">
thenfile['href']
from loop:mkdocs-exclude-unused-files/mkdocs_exclude_unused_files/plugin.py
Line 61 in aceb9e2
throw
proposed solution:
it will scraping only valid links.
fix with abstraction proposed in: #1
The text was updated successfully, but these errors were encountered: