-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
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
Upon enabling both the privacy plugin and the git-revision-date-localized plugin, and setting the type value for git-revision-date-localized to timeago, attempting to build the site will begin failing with the following error:
Traceback (most recent call last):
File "/home/nint8835/Development/privacy-bug-repro/venv/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/mkdocs/__main__.py", line 286, in build_command
build.build(cfg, dirty=not clean)
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/mkdocs/commands/build.py", line 304, in build
files = config.plugins.on_files(files, config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/mkdocs/plugins.py", line 533, in on_files
return self.run_event('files', files, config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/mkdocs/plugins.py", line 507, in run_event
result = method(item, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/nint8835/Development/privacy-bug-repro/venv/lib/python3.11/site-packages/material/plugins/privacy/plugin.py", line 118, in on_files
url = urlparse(script.path)
^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'path'
This only occurs when specifically those 3 combination of things have been done. The issue can be worked around by:
- Removing the
typeconfig ongit-revision-date-localizedor changing it to a different value, such asdatetime - Removing the
git-revision-date-localizedplugin entirely - Removing the
privacyplugin
Related links
- Reporting a bug
- Privacy plugin
- git-revision-date-localized plugin
- Privacy plugin no longer works with extra_javascript configured #5772 - initially thought this was the issue I was encountering but removing all my
extra_javascriptconfig never fixed it
Reproduction
Steps to reproduce
- Install dependencies
- Run
mkdocs serveormkdocs 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open