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

plugin.py does not find mkdocs_print_site_plugin/css directory #12

Closed
MegandM opened this issue Sep 15, 2020 · 2 comments
Closed

plugin.py does not find mkdocs_print_site_plugin/css directory #12

MegandM opened this issue Sep 15, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@MegandM
Copy link

MegandM commented Sep 15, 2020

Hi!

After installing mkdocs-print-site 0.5 version and running mkdocs build the following error appears:

Traceback (most recent call last):
  File "/workenv/user/.conda/envs/orchestrator_docs/bin/mkdocs", line 11, in <module>
    sys.exit(cli())
  File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/sw82tc/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/user/.local/lib/python3.6/site-packages/mkdocs/__main__.py", line 152, in build_command
    build.build(config.load_config(**kwargs), dirty=not clean)
  File "/home/user/.local/lib/python3.6/site-packages/mkdocs/commands/build.py", line 236, in build
    config = config['plugins'].run_event('config', config)
  File "/home/user/.local/lib/python3.6/site-packages/mkdocs/plugins.py", line 94, in run_event
    result = method(item, **kwargs)
  File "/home/user/.local/lib/python3.6/site-packages/mkdocs_print_site_plugin/plugin.py", line 60, in on_config
    if file in os.listdir(os.path.join(HERE, "css")):
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.local/lib/python3.6/site-packages/mkdocs_print_site_plugin/css'

Python version is:

$ python -V
Python 3.6.2 :: Continuum Analytics, Inc.

mkdocs version is:

$ pip list | grep mkdocs
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
mkdocs (1.1.2)
mkdocs-awesome-pages-plugin (2.2.1)
mkdocs-enumerate-headings-plugin (0.4.1)
mkdocs-git-authors-plugin (0.3.2)
mkdocs-git-revision-date-localized-plugin (0.7)
mkdocs-material (5.5.12)
mkdocs-material-extensions (1.0)
mkdocs-minify-plugin (0.3.0)
mkdocs-pdf-export-plugin (0.5.8)
mkdocs-print-site-plugin (0.5)
mkdocs-table-reader-plugin (0.4.2)
mkdocstrings (0.13.1)

and the plugins included in mkdocs.yml are added in the following order:

plugins:
    - minify:
        minify_html: true
    - git-revision-date-localized:
        type: timeago
    - git-authors:
        show_contribution: True
    - table-reader
    - enumerate-headings
    - awesome-pages
    - pdf-export:
        verbose: true
        media_type: print
        combined: true
        enabled_if_env: ENABLE_PDF_EXPORT
    - search
    - mkdocstrings:
        default_handler: python
        handlers:
            python:
                rendering:
                    show_source: true
        watch:
            - src/orchestrator
    - print-site

Could you help me?

Thanks!

@timvink timvink added the bug Something isn't working label Sep 15, 2020
@timvink
Copy link
Owner

timvink commented Sep 15, 2020

Thanks for the report.

I used pip install -e . to install the package, but a normal pip install apparently does not distribute the package data files.

Basically means the package is now broken.. will fix asap !

@timvink
Copy link
Owner

timvink commented Sep 15, 2020

Found and fixed the bug, which was due to an incorrect MANIFEST.in file. Also updated the github actions running the tests to ensure this doesn't happen again.

New release v0.5.1 is on pypi https://github.com/timvink/mkdocs-print-site-plugin/releases/tag/v0.5.1

Thanks again @MegandM !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants