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

Cannot find module 'materialx.emoji' #2

Open
julien-deramond opened this issue Sep 27, 2023 · 6 comments
Open

Cannot find module 'materialx.emoji' #2

julien-deramond opened this issue Sep 27, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@julien-deramond
Copy link
Member

Description

mkdocs.yml contains 3 lines that are commented and that were originally here in the repo before being migrated to GitHub:

# - pymdownx.emoji:
  #    emoji_index: !!python/name:materialx.emoji.twemoji
  #    emoji_generator: !!python/name:materialx.emoji.to_svg

They have been commented because generated the following error while running mkdocs serve:

Error: MkDocs encountered an error parsing the configuration file: while constructing a Python object
cannot find module 'materialx.emoji' (No module named 'materialx')
  in "/Users/ju/ods-mkdocs-theme/mkdocs.yml", line 36, column 20

Haven't figured out how to fix this issue.

If you have any information to fix it or allow us to definitely remove these comments, don't hesitate.

@julien-deramond julien-deramond added the enhancement New feature or request label Sep 27, 2023
@Lausselloic
Copy link
Member

As we declare mkdocs-material as a required dependency, by default mkdocs-material-extensions is also installed.

If anybody reproduce it, pip install mkdocs-material-extensions seems to solve the issue, but don't know if we need to add it clearly as a required dependency?

@shenshanyoumu
Copy link

pip install mkdocs-material-extensions not works

@drabastomek
Copy link

As above. Installing mkdocs-material-extensions did not work for me.

1 similar comment
@schwannden
Copy link

As above. Installing mkdocs-material-extensions did not work for me.

@schwannden
Copy link

After using which mkdocs, I realize the mkdocs binary is in /usr/bin/mkdocs, not the one in my venv, so mkdocs and pip install mkdocs-material-extensions happens in different virtual environment. I have solved this by removing /usr/bin/mkdocs, and only use mkdocs in my venv.

@Siroccomeister
Copy link

Hello I had changed those lines to the following : https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/#configuration so essentially in mkdocs.yml :

  • pymdownx.emoji:
    emoji_index: !!python/name:material.extensions.emoji.twemoji
    emoji_generator: !!python/name:material.extensions.emoji.to_svg

This removed the mkdocs serve error for me. My understanding is that materialx is deprecated/replaced by a standard extension that is now included in Material theme....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants