8000 Privacy plugin serve and build error. · Issue #4572 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Privacy plugin serve and build error. #4572

@tamasgt

Description

@tamasgt

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

Hello,

this worked in a previous version. Now it throws an error.

Tamas

Expected behaviour

See in actual behavior.

Actual behaviour

mkdocs serve
INFO     -  Building documentation...
INFO     -  Cleaning site directory
WARNING  -  Couldn't create symbolic link 'assets/external/fonts.googleapis.com/css'
ERROR    -  Error building page 'index.md': [Errno 2] No such file or directory:
            '.cache\\plugin\\privacy\\assets\\external\\fonts.googleapis.com\\css'
FileNotFoundError: [Errno 2] No such file or directory: '.cache\\plugin\\privacy\\assets\\external\\fonts.googleapis.com\\css
mkdocs build
INFO     -  Cleaning site directory
INFO     -  Building documentation to directory: C:\Users\zzzz\source\GitHub\www\test-material\site
WARNING  -  Couldn't create symbolic link 'assets/external/fonts.googleapis.com/css'
ERROR    -  Error building page 'index.md': [Errno 2] No such file or directory:
            '.cache\\plugin\\privacy\\assets\\external\\fonts.googleapis.com\\css'
Traceback (most recent call last):
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\Scripts\mkdocs.exe\__main__.py", line 7, in <module>    
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\mkdocs\__main__.py", line 250, in build_command
    build.build(cfg, dirty=not clean)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\mkdocs\commands\build.py", line 329, in build    _build_page(file.page, config, doc_files, nav, env, dirty)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\mkdocs\commands\build.py", line 234, in _build_page
    output = config.plugins.run_event('post_page', output, page=page, config=config)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\mkdocs\plugins.py", line 517, in run_event   
    result = method(item, **kwargs)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\material\plugins\privacy\plugin.py", line 151, in on_post_page
    value.replace(raw, self._fetch(url, page.file, config)),
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\material\plugins\privacy\plugin.py", line 274, in _fetch
    file.copy_file()
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\mkdocs\structure\files.py", line 250, in copy_file
    utils.copy_file(self.abs_src_path, self.abs_dest_path)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\site-packages\mkdocs\utils\__init__.py", line 170, in copy_file
    shutil.copyfile(source_path, output_path)
  File "C:\Users\zzzz\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '.cache\\plugin\\privacy\\assets\\external\\fonts.googleapis.com\\css

Steps to reproduce

See in actual behavior.

Package versions

mkdocs: 1.4.1
mkdocs-material: 8.5.7+insiders.4.26.1

Configuration

site_name: Test Material

# Theme
theme:
  name: material
  #Font
  font:
    text: Roboto
    code: Roboto Mono

plugins:
  - search:
      lang: hu
  - privacy
  - blog

nav:
  - Home: index.md
  - Sample 1:
    - Page 1: sample-1/page-1.md
    - Page 2: sample-1/page-2.md
  - Sample 2:
    - Page 1: sample-2/page-1.md
    - Page 2: sample-2/page-2.md
  - Blog:
    - blog/index.md

System information

  • Operating system: Windows 10
  • Browser: Chrome

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