Issue with the social plugin and docker image #6991
-
I'm trying to get the social plugin to work with the docker image but I don't know what I'm doing wrong: Here is my docker file: FROM squidfunk/mkdocs-material
RUN pip install --upgrade \
mkdocs \
mkdocs-material \
mkdocs-exclude \
mkdocs-material-extensions \
mkdocs-minify-plugin \
mkdocs-git-authors-plugin \
mkdocs-git-committers-plugin \
mkdocs-git-revision-date-localized-plugin \
"mkdocs-material[imaging]" \
pillow \
cairosvg > docker build -t my-mkdocs-image .
> docker run --rm -it -v ${PWD}:/docs my-mkdocs-image build --clean Here is the error I'm getting, only when enabling the social plugin: > docker run --rm -it -v ${PWD}:/docs my-mkdocs-image build --clean
Traceback (most recent call last):
File "/usr/local/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mkdocs/__main__.py", line 286, in build_command
build.build(cfg, dirty=not clean)
File "/usr/local/lib/python3.11/site-packages/mkdocs/commands/build.py", line 277, in build
config = config.plugins.on_config(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mkdocs/plugins.py", line 527, in on_config
return self.run_event('config', config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/mkdocs/plugins.py", line 507, in run_event
result = method(item, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/material/plugins/social/plugin.py", line 141, in on_config
self.font = self._load_font(config)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/material/plugins/social/plugin.py", line 457, in _load_font
self._load_font_from_google(name)
File "/usr/local/lib/python3.11/site-packages/material/plugins/social/plugin.py", line 480, in _load_font_from_google
zip = ZipFile(tmp)
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/zipfile.py", line 1304, in __init__
self._RealGetContents()
File "/usr/local/lib/python3.11/zipfile.py", line 1371, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file |
Beta Was this translation helpful? Give feedback.
Answered by
kamilkrzyskow
Mar 29, 2024
Replies: 1 comment 1 reply
-
Hello @jturbide, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jturbide
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @jturbide,
please check the issues and discussions board before posting. There is currently a bug with fetching fonts from Google Fonts: