Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Privacy plugin is missing lxml as dependency #3610

Closed
5 tasks done
Guts opened this issue Feb 21, 2022 · 2 comments
Closed
5 tasks done

Privacy plugin is missing lxml as dependency #3610

Guts opened this issue Feb 21, 2022 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@Guts
Copy link
Contributor

Guts commented Feb 21, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

The new Privacy plugin is missing lxml package as dependency in setup.py/pyproject.toml.

Expected behaviour

Build works

Actual behaviour

mkdocs build
Traceback (most recent call last):
  File "/home/username/Git/Geotribu/website/.venv/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/mkdocs/__main__.py", line 187, in build_command
    build.build(config.load_config(**kwargs), dirty=not clean)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/mkdocs/config/base.py", line 224, in load_config
    errors, warnings = cfg.validate()
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/mkdocs/config/base.py", line 108, in validate
    run_failed, run_warnings = self._validate()
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/mkdocs/config/base.py", line 63, in _validate
    self[key] = config_option.validate(value)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 130, in validate
    return self.run_validation(value)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 636, in run_validation
    plgins[item] = self.load_plugin(item, cfg)
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 649, in load_plugin
    Plugin = self.installed_plugins[name].load()
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/username/Git/Geotribu/website/.venv/lib/python3.8/site-packages/material/plugins/privacy/plugin.py", line 25, in <module>
    from lxml import html
ModuleNotFoundError: No module named 'lxml'

Steps to reproduce

  1. Install Insiders: python -m pip install -U git+https://${GH_TOKEN_MATERIAL_INSIDERS}@github.com/squidfunk/mkdocs-material-insiders.git@8.2.1-insiders-4.9.0#egg=mkdocs-material
  2. Enable Privacy plugin according to https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#built-in-privacy
  3. mkdocs build

Package versions

  • Python: 3.8
  • MkDocs: 1.2.3
  • Material: 8.2.1+insiders.4.9.0

Configuration

- plugins:
    -privacy:
        download: !ENV [MATERIAL_PRIVACY_PLUGIN, true]

System information

Ubuntu LTS (20.04)

@squidfunk
Copy link
Owner

squidfunk commented Feb 21, 2022

Already fixed 😊 @wilhelmer already reached out to me. I'll issue a new release shortly.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open labels Feb 21, 2022
@squidfunk
Copy link
Owner

Released as part of 8.2.1+insiders-4.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants