8000 AttributeError: 'SearchPlugin' object has no attribute 'is_dirty' · Issue #6364 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

AttributeError: 'SearchPlugin' object has no attribute 'is_dirty' #6364

@vedranmiletic

Description

@vedranmiletic

Context

No response

Bug description

If one enables Material theme after running mkdocs serve, the build will fail with:

% mkdocs serve 
INFO    -  Building documentation...
INFO    -  Cleaning site directory
INFO    -  Documentation built in 0.18 seconds
INFO    -  [17:53:32] Watching paths for changes: 'docs', 'mkdocs.yml'
INFO    -  [17:53:32] Serving on http://127.0.0.1:8000/
INFO    -  [17:53:36] Browser connected: https://staging.group.miletic.net/
INFO    -  [17:53:47] Detected file changes
INFO    -  Building documentation...
Traceback (most recent call last):
  File "/home/vedranm/software/mkdocs/.venv/lib/python3.9/site-packages/mkdocs/livereload/__init__.py", line 193, in _build_loop
    func()
  File "/home/vedranm/software/mkdocs/.venv/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 67, in builder
    build(config, live_server=None if is_clean else server, dirty=is_dirty)
  File "/home/vedranm/software/mkdocs/.venv/lib/python3.9/site-packages/mkdocs/commands/build.py", line 354, in build
    config.plugins.on_post_build(config=config)
  File "/home/vedranm/software/mkdocs/.venv/lib/python3.9/site-packages/mkdocs/plugins.py", line 542, in on_post_build
    return self.run_event('post_build', config=config)
  File "/home/vedranm/software/mkdocs/.venv/lib/python3.9/site-packages/mkdocs/plugins.py", line 509, in run_event
    result = method(**kwargs)
  File "/home/vedranm/software/mkdocs/.venv/lib/python3.9/site-packages/material/plugins/search/plugin.py", line 136, in on_post_build
    if self.is_dirty:
AttributeError: 'SearchPlugin' object has no attribute 'is_dirty'
ERROR   -  [17:53:49] An error happened during the rebuild. The server will appear stuck until build errors are resolved.

Related links

Reproduction

9.4.10-searchplugin-is_dirty.zip

Steps to reproduce

  1. mkdocs new mysite
  2. cd mysite
  3. mkdocs serve
  4. Add the following lines to mkdocs.yml while mkdocs serve is running:
    theme:
      name: material
  5. Notice the AttributeError in the terminal.

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0