Closed dmitry-tiger closed 1 year ago
ping @kamilkrzyskow
I'll look at it ASAP unless Kamin beats me to it, thanks for reporting this and sorry for the issue @dmitry-tiger
The error originates in /usr/local/lib/python3.9/site-packages/materialx/emoji.py
🤔.
I don't think I made any changes related to it...
@dmitry-tiger could you provide the result of pip freeze
here ✌️
I tried to run it locally and everything sadly works:
$ python --version
Python 3.9.13
$ pip freeze
click==8.1.3
colorama==0.4.6
ghp-import==2.1.0
importlib-metadata==6.1.0
Jinja2==3.1.2
Markdown==3.3.7
MarkupSafe==2.1.2
mergedeep==1.3.4
mkdocs==1.4.2
mkdocs-material==8.4.0
mkdocs-material-extensions==1.1.1
-e git+https://github.com/kamilkrzyskow/i18n.git@67a324bd019d9a0f3b31afb652e06b8e0af64095#egg=mkdocs_static_i18n
packaging==23.0
Pygments==2.14.0
pymdown-extensions==9.10
python-dateutil==2.8.2
PyYAML==6.0
pyyaml_env_tag==0.1
six==1.16.0
watchdog==3.0.0
zipp==3.15.0
Also you said something about "mkdocs-material:8.4.0 image". You mean a docker image? Default one or modified?
Based on this https://stackoverflow.com/questions/65523340/why-does-inspect-say-that-my-module-is-built-in
I would assume there is some kind of material
directory somewhere that is imported instead of the actual material
theme 🤔
That "somewhere" is inside one of the loaded site-packages paths, but I'm not sure how to guide you to finding them 🤔
I'm using image https://hub.docker.com/layers/squidfunk/mkdocs-material/8.4.0/ for base in my docker container only one thing i'm doing on top of base image is only RUN pip install --no-cache-dir mkdocs-static-i18n i made basic setup to reproduce errror just run build -t test1 . inside directory 231312.tar.gz I'm not sure that it is issue inside this plugin but setting version to 0.53 doesn't produce that error
In 0.5.4 the version for MkDocs increased to 1.4.2, it was a jump from version 1.2.
The scripts also introduced the event priorities, but we lack a fallback function in case the plugins
decorator isn't available on older versions, but the error doesn't display this...
I did not check this issue yet but do you mean that pip does not do its job to honor the mkdocs >= 1.4.2
dependency? I'm confused.
I got lucky that I still didn't bother to uninstall docker, after it broke my other VMs (good that I don't use them...)
I was able to reproduce it. I modified the test file and added a script to see what is going on.
It seems that somehow some parts of the mkdocs-material
get deleted when mkdocs
1.3.1 is deleted and 1.4.2 is installed. I don't see the removal in the pip
log, but I see the removed __init__.py
file.
@ultrabug maybe you'll get something out of the log, for now I'm not sure how to fix it, other than to keep the version like it was before in the setup.py
. But if we'll support MkDocs<1.4 then it's required to add a fallback to the event priorities. There is an example
in the documentation.
@dmitry-tiger A quick fix for you until we figure it out:
RUN pip install --no-cache-dir mkdocs-static-i18n==0.54
RUN pip uninstall mkdocs-material -y
RUN pip install --no-cache-dir mkdocs-material==8.4.0
I run pip
with -v
and confirmed that the uninstall of MkDocs
1.3.1 is the cause of the issue.
#9 5.955 Attempting uninstall: mkdocs
#9 5.955 Found existing installation: mkdocs 1.3.1
#9 5.978 Uninstalling mkdocs-1.3.1:
#9 6.004 Created temporary directory: /tmp/pip-uninstall-cwu6mik2
#9 6.007 Removing file or directory /usr/local/bin/mkdocs
#9 6.008 Created temporary directory: /tmp/pip-uninstall-y47i4m2q
#9 6.010 Removing file or directory /usr/local/lib/python3.9/site-packages/material/404.html
#9 6.011 Removing file or directory /usr/local/lib/python3.9/site-packages/material/__init__.py
#9 6.013 Removing file or directory /usr/local/lib/python3.9/site-packages/material/base.html
#9 6.015 Removing file or directory /usr/local/lib/python3.9/site-packages/material/main.html
#9 6.018 Removing file or directory /usr/local/lib/python3.9/site-packages/material/mkdocs_theme.yml
#9 6.018 Created temporary directory: /usr/local/lib/python3.9/site-packages/~kdocs-1.3.1.dist-info
#9 6.019 Removing file or directory /usr/local/lib/python3.9/site-packages/mkdocs-1.3.1.dist-info/
#9 6.019 Created temporary directory: /usr/local/lib/python3.9/site-packages/~kdocs
#9 6.037 Removing file or directory /usr/local/lib/python3.9/site-packages/mkdocs/
#9 6.037 Successfully uninstalled mkdocs-1.3.1
I guess that the material theme plugin somehow is linked with the mkdocs dependency and is removed together with it.
It seems to me that's it's a problem specific to the docker images of material.
One could use mkdocs-material 8.x with newer plugin since mkdocs-material 8.4.0 has mkdocs>=1.3.0
dependency so I believe that the problem can't affect regular virtualenv users.
I'm thus not sure I'd call this a "regression" from this plugin's perspective I'm afraid.
I'm happy to announce release v1.0.0 of the mkdocs-static-i18n
plugin!
Please check it out and reopen if needed.
Hello, I'm using mkdocs-material:8.4.0 image as base and when mkdocs-static-i18n module upgraded to 0.54 (tried last version and got same error) I started getting error during
mkdocs buid
with version 0.53 it works well could it be related to old mkdocs-material release which we use?