squidfunk/mkdocs-material

Disabling privacy plugin throws an error

Closed this issue · 4 comments

Context

No response

Bug description

If you define that privacy is explicitly disabled, mkdocs serve crashes:

plugins:
  - privacy:
      enabled: false

Error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/mkdocs/livereload/__init__.py", line 211, in _build_loop
    self.builder()
  File "/usr/local/lib/python3.11/site-packages/mkdocs/commands/serve.py", line 67, in builder
    build(config, serve_url=None if is_clean else serve_url, dirty=is_dirty)
  File "/usr/local/lib/python3.11/site-packages/mkdocs/commands/build.py", line 319, in build
    env = config.plugins.on_env(env, config=config, files=files)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mkdocs/plugins.py", line 599, in on_env
    return self.run_event('env', env, config=config, files=files)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mkdocs/plugins.py", line 566, in run_event
    result = method(item, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/material/plugins/privacy/plugin.py", line 152, in on_env
    wait(self.pool_jobs)
         ^^^^^^^^^^^^^^
AttributeError: 'PrivacyPlugin' object has no attribute 'pool_jobs'

Related links

Reproduction

9.5.41-explicit-disable-privacy.zip

Steps to reproduce

  1. mkdocs serve
  2. Crashes instantly

Browser

Chrome

Before submitting

Thanks for reporting. It's a 9.5.41 regression. Fixed in e2c621f.

Thanks!
What is your release cycle? When will I see this on docker hub?

Yes, it will be part of 9.5.42. Usually once a week. We just released 9.5.41 yesterday, and this is not a fatal bug, so give it a few days. You can always use Material for MkDocs from git, to use the version that contains the fix.

Released as part of 9.5.42.